Do not try to update head of current branch

This commit is contained in:
Michal Dorner 2021-03-08 15:29:27 +01:00
parent 68792bf56a
commit 8801c887e9
No known key found for this signature in database
GPG key ID: 9EEE04B48DA36786
2 changed files with 2 additions and 2 deletions

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')