Skip to content

Commit

Permalink
chore(git): trace log branch commits (#31805)
Browse files Browse the repository at this point in the history
  • Loading branch information
rarkins authored Oct 5, 2024
1 parent 6b5af27 commit 3a6465e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/util/git/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,14 +199,17 @@ async function fetchBranchCommits(): Promise<void> {
);
}
try {
(await gitRetry(() => git.raw(opts)))
const lsRemoteRes = await gitRetry(() => git.raw(opts));
logger.trace({ lsRemoteRes }, 'git ls-remote result');
lsRemoteRes
.split(newlineRegex)
.filter(Boolean)
.map((line) => line.trim().split(regEx(/\s+/)))
.forEach(([sha, ref]) => {
config.branchCommits[ref.replace('refs/heads/', '')] =
sha as LongCommitSha;
});
logger.trace({ branchCommits: config.branchCommits }, 'branch commits');
} catch (err) /* istanbul ignore next */ {
const errChecked = checkForPlatformFailure(err);
if (errChecked) {
Expand Down

0 comments on commit 3a6465e

Please sign in to comment.