Skip to content
Snippets Groups Projects
Unverified Commit 00cb277b authored by Michael Kriese's avatar Michael Kriese Committed by GitHub
Browse files

fix(git): add debug (#9683)

parent c542cbe7
Branches
No related tags found
No related merge requests found
......@@ -450,13 +450,19 @@ export function getBranchList(): string[] {
export async function isBranchStale(branchName: string): Promise<boolean> {
await syncBranch(branchName);
try {
const { currentBranchSha, currentBranch } = config;
const branches = await git.branch([
'--remotes',
'--verbose',
'--contains',
config.currentBranchSha,
]);
return !branches.all.map(localName).includes(branchName);
const isStale = !branches.all.map(localName).includes(branchName);
logger.debug(
{ isStale, branches, currentBranch, currentBranchSha },
`IsBranchStale=${isStale}`
);
return isStale;
} catch (err) /* istanbul ignore next */ {
checkForPlatformFailure(err);
throw err;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment