Do not try to update head of current branch

This commit is contained in:
Michal Dorner committed 2021-03-08 15:29:27 +01:00
1 parent 68792bf56a
commit 8801c887e9
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -69,7 +69,7 @@ export async function getChangesSinceMergeBase(
let lastCommitCount = await getCommitCount()
let depth = Math.max(lastCommitCount * 2, initialFetchDepth)
while (!(await hasMergeBase())) {
await exec('git', ['fetch', `--depth=${depth}`, 'origin', `${baseRef}:${baseRef}`, `${ref}:${ref}`])
await exec('git', ['fetch', `--depth=${depth}`, 'origin', `${baseRef}:${baseRef}`, `${ref}`])
const commitCount = await getCommitCount()
if (commitCount === lastCommitCount) {
core.info('No more commits were fetched')