diff --git a/dist/index.js b/dist/index.js index da243b57..a16648d6 100644 --- a/dist/index.js +++ b/dist/index.js @@ -3875,7 +3875,7 @@ async function getChangesSinceMergeBase(baseRef, ref, initialFetchDepth) { let lastCommitCount = await getCommitCount(); let depth = Math.max(lastCommitCount * 2, initialFetchDepth); while (!(await hasMergeBase())) { - await exec_1.default('git', ['fetch', `--depth=${depth}`, 'origin', `${baseRef}:${baseRef}`, `${ref}:${ref}`]); + await exec_1.default('git', ['fetch', `--depth=${depth}`, 'origin', `${baseRef}:${baseRef}`, `${ref}`]); const commitCount = await getCommitCount(); if (commitCount === lastCommitCount) { core.info('No more commits were fetched'); diff --git a/src/git.ts b/src/git.ts index 2cfa8aeb..c58621fd 100644 --- a/src/git.ts +++ b/src/git.ts @@ -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')