fix: allow updating head

This commit is contained in:
Jose Diaz-Gonzalez committed 2021-01-17 19:34:07 -05:00
1 parent 03dc90b4fd
commit d58fe853d6
1 file changed
+2 -2
+2 -2
View File
@@ -225,9 +225,9 @@ fn-git-fetch() {
git remote rm remote > /dev/null 2>&1 || true git remote rm remote > /dev/null 2>&1 || true
git remote add --mirror=fetch --no-tags remote "$GIT_REMOTE" git remote add --mirror=fetch --no-tags remote "$GIT_REMOTE"
if [[ -z "$GIT_REF" ]]; then if [[ -z "$GIT_REF" ]]; then
git fetch remote "$DOKKU_DEPLOY_BRANCH" git fetch --update-head-ok remote "$DOKKU_DEPLOY_BRANCH"
else else
git fetch remote git fetch --update-head-ok remote
git update-ref "refs/heads/$DOKKU_DEPLOY_BRANCH" "$GIT_REF" git update-ref "refs/heads/$DOKKU_DEPLOY_BRANCH" "$GIT_REF"
fi fi
popd > /dev/null popd > /dev/null