summaryrefslogtreecommitdiff
path: root/support
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-02-06 17:39:31 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-02-06 17:39:31 +0200
commit9a407166fb5ec31e4bee70d165bb345ee9e06a6b (patch)
tree8ff4249b2978dca1fbe0fa45a4fdc185a48cb85b /support
parent96454ac5894b97bd9d94877524c77efa5d82fa14 (diff)
downloadgitlab-shell-9a407166fb5ec31e4bee70d165bb345ee9e06a6b.tar.gz
Update hook and support for protected branches
Diffstat (limited to 'support')
-rwxr-xr-xsupport/rewrite-hooks.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/support/rewrite-hooks.sh b/support/rewrite-hooks.sh
index ad8b4e5..4f8ec05 100755
--- a/support/rewrite-hooks.sh
+++ b/support/rewrite-hooks.sh
@@ -15,7 +15,10 @@ do
then
project_hook="$src/$dir/hooks/post-receive"
gitolite_hook="/home/git/gitlab-shell/hooks/post-receive"
+ ln -s -f $gitolite_hook $project_hook
+ project_hook="$src/$dir/hooks/update"
+ gitolite_hook="/home/git/gitlab-shell/hooks/update"
ln -s -f $gitolite_hook $project_hook
else
for subdir in `ls "$src/$dir/"`
@@ -23,7 +26,10 @@ do
if [ -d "$src/$dir/$subdir" ] && [[ "$subdir" =~ ^.*.git$ ]]; then
project_hook="$src/$dir/$subdir/hooks/post-receive"
gitolite_hook="/home/git/gitlab-shell/hooks/post-receive"
+ ln -s -f $gitolite_hook $project_hook
+ project_hook="$src/$dir/$subdir/hooks/update"
+ gitolite_hook="/home/git/gitlab-shell/hooks/update"
ln -s -f $gitolite_hook $project_hook
fi
done