From d58fe853d6b4c01871c558145aa3677964f27421 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sun, 17 Jan 2021 19:34:07 -0500 Subject: [PATCH] fix: allow updating head --- plugins/git/internal-functions | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/git/internal-functions b/plugins/git/internal-functions index f3a00dad8..f19649061 100755 --- a/plugins/git/internal-functions +++ b/plugins/git/internal-functions @@ -225,9 +225,9 @@ fn-git-fetch() { git remote rm remote > /dev/null 2>&1 || true git remote add --mirror=fetch --no-tags remote "$GIT_REMOTE" if [[ -z "$GIT_REF" ]]; then - git fetch remote "$DOKKU_DEPLOY_BRANCH" + git fetch --update-head-ok remote "$DOKKU_DEPLOY_BRANCH" else - git fetch remote + git fetch --update-head-ok remote git update-ref "refs/heads/$DOKKU_DEPLOY_BRANCH" "$GIT_REF" fi popd > /dev/null