From 97b0aa3eb8a01bed995aa7ecd6098f1b9664b0f8 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sun, 11 Jul 2021 21:26:14 -0400 Subject: [PATCH] fix: ensure repository is bare when calling git:sync Closes #4636 --- plugins/git/internal-functions | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/git/internal-functions b/plugins/git/internal-functions index b67bc850d..1e0b9ea97 100755 --- a/plugins/git/internal-functions +++ b/plugins/git/internal-functions @@ -421,6 +421,7 @@ fn-git-clone() { rsync -a "$APP_CLONE_ROOT/.git/" "$APP_ROOT" fn-git-create-hook "$APP" + fn-git-cmd "$APP_CLONE_ROOT" config --add core.bare true } fn-git-cmd() { @@ -459,6 +460,8 @@ fn-git-fetch() { GIT_TERMINAL_PROMPT=0 fn-git-cmd "$APP_ROOT" fetch --update-head-ok remote fn-git-cmd "$APP_ROOT" update-ref "refs/heads/$DOKKU_DEPLOY_BRANCH" "$GIT_REF" fi + + fn-git-cmd "$APP_CLONE_ROOT" config --add core.bare true } fn-git-last-updated-at() {