diff options
Diffstat (limited to 'lib/gitolite3/hooks/common')
-rwxr-xr-x | lib/gitolite3/hooks/common/post-receive | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/gitolite3/hooks/common/post-receive b/lib/gitolite3/hooks/common/post-receive index 9342075..ab100d9 100755 --- a/lib/gitolite3/hooks/common/post-receive +++ b/lib/gitolite3/hooks/common/post-receive @@ -7,7 +7,9 @@ set -eu -[ -n "$GL_OPTION_WEB_BRANCH" ] || exit 0 +WEB_BRANCH=${GL_OPTION_WEB_BRANCH:-} + +[ -n "$WEB_BRANCH" ] || exit 0 # which git branch to check out WEB_BASEDIR=${GL_OPTION_WEB_BASEDIR:-/var/www/gitolite3} @@ -18,7 +20,7 @@ export GIT_WORK_TREE pwd echo "Checking out content to $GIT_WORK_TREE ..." -git checkout -f "$GL_OPTION_WEB_BRANCH" +git checkout -f "$WEB_BRANCH" chmod -R u=rw,go=r,a+X "$GIT_WORK_TREE" |