From e1c7845dee04cb2caf9e20328d630c12680dca10 Mon Sep 17 00:00:00 2001 From: Rhys Arkins <rhys@arkins.net> Date: Thu, 10 Jun 2021 22:12:45 +0200 Subject: [PATCH] fix(git): git pull immediately after automerge (#10390) Call git.pull() before performing a fetch, to handle the case where the default branch has been updated. Closes #10372 --- lib/util/git/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/util/git/index.ts b/lib/util/git/index.ts index f168aa1428..8d9eddaf07 100644 --- a/lib/util/git/index.ts +++ b/lib/util/git/index.ts @@ -266,6 +266,7 @@ export async function syncGit(): Promise<void> { try { await git.raw(['remote', 'set-url', 'origin', config.url]); await resetToBranch(await getDefaultBranch(git)); + await git.pull(); // istanbul ignore if if (process.env.NODE_ENV !== 'test') { await git.raw(['config', '--unset-all', 'remote.origin.fetch']); -- GitLab