Skip to content

Commit

Permalink
fix: ensure git.hasDiff will not compare against files (#23376)
Browse files Browse the repository at this point in the history
  • Loading branch information
felipecrs committed Jul 15, 2023
1 parent a1b8960 commit f529147
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/util/git/index.ts
Expand Up @@ -897,7 +897,9 @@ export async function hasDiff(
): Promise<boolean> {
await syncGit();
try {
return (await gitRetry(() => git.diff([sourceRef, targetRef]))) !== '';
return (
(await gitRetry(() => git.diff([sourceRef, targetRef, '--']))) !== ''
);
} catch (err) {
return true;
}
Expand Down

0 comments on commit f529147

Please sign in to comment.