From d9ed1e07ebe3f6a20541ce9c9655ab3a7cc6720b Mon Sep 17 00:00:00 2001 From: Michael Huynh Date: Mon, 23 Dec 2013 21:50:49 -0500 Subject: [PATCH] Fix edge case: app directory is created before first app push When an app directory (i.e. `/home/dokku/myapp`) is created before the app is pushed for the first time (which may occur if config files such as `ENV` are added before the initial push), then the app directory will not be initialized to a bare git repo nor will the pre-receive hook be installed because `plugins/git/commands` assumes that if `$APP_PATH` exists, then the directory must also be git initialized too. This fix checks for `$APP_PATH/refs` instead. --- plugins/git/commands | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/git/commands b/plugins/git/commands index 84c3a7289..b7b1cb2c2 100755 --- a/plugins/git/commands +++ b/plugins/git/commands @@ -23,7 +23,7 @@ case "$1" in APP="$(echo $2 | perl -pe 's/(? /dev/null PRERECEIVE_HOOK="$APP_PATH/hooks/pre-receive" cat > $PRERECEIVE_HOOK <