diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-02-06 17:39:31 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-02-06 17:39:31 +0200 |
commit | 9a407166fb5ec31e4bee70d165bb345ee9e06a6b (patch) | |
tree | 8ff4249b2978dca1fbe0fa45a4fdc185a48cb85b /support | |
parent | 96454ac5894b97bd9d94877524c77efa5d82fa14 (diff) | |
download | gitlab-shell-9a407166fb5ec31e4bee70d165bb345ee9e06a6b.tar.gz |
Update hook and support for protected branches
Diffstat (limited to 'support')
-rwxr-xr-x | support/rewrite-hooks.sh | 6 |
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 |