Skip to content
Snippets Groups Projects
Commit 43d71535 authored by Rhys Arkins's avatar Rhys Arkins
Browse files

fix(git): robust git diff for getBranchFiles

Closes #7454
parent 4cd14086
No related branches found
No related tags found
No related merge requests found
......@@ -500,7 +500,7 @@ export async function getBranchLastCommitTime(
export async function getBranchFiles(branchName: string): Promise<string[]> {
await syncBranch(branchName);
try {
const diff = await git.diffSummary([branchName, config.currentBranch]);
const diff = await git.diffSummary([`${branchName}^`]);
return diff.files.map((file) => file.file);
} catch (err) /* istanbul ignore next */ {
logger.warn({ err }, 'getBranchFiles error');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment