diff options
author | 2012-02-29 13:23:58 +0530 | |
---|---|---|
committer | 2012-02-29 13:23:58 +0530 | |
commit | d3b2dda5df442e543197d4349cf6d85a885d744d (patch) | |
tree | 0f1ef898d97f3ba65a24174b8712005c3e0f47fa | |
parent | merge all the '-h' related changes (diff) | |
download | gitolite-gentoo-d3b2dda5df442e543197d4349cf6d85a885d744d.tar.gz gitolite-gentoo-d3b2dda5df442e543197d4349cf6d85a885d744d.tar.bz2 gitolite-gentoo-d3b2dda5df442e543197d4349cf6d85a885d744d.zip |
fork ADC: stop carrying along non-gitolite hooks
When someone adds a repo-specific hook to their repo, then create a
'fork' via the fork ADC, this repo-specific hook also get carried
across, but should not.
-rwxr-xr-x | contrib/adc/fork | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/contrib/adc/fork b/contrib/adc/fork index 81a0f3e..f144c91 100755 --- a/contrib/adc/fork +++ b/contrib/adc/fork @@ -24,7 +24,15 @@ echo $GL_USER > gl-creater git config gitweb.owner "$GL_USER" ( $GL_BINDIR/gl-query-rc GL_WILDREPOS_DEFPERMS ) | SSH_ORIGINAL_COMMAND="setperms $to" $GL_BINDIR/gl-auth-command $GL_USER -cp -R $GL_REPO_BASE_ABS/$from.git/hooks/* $GL_REPO_BASE_ABS/$to.git/hooks + +# symlink hooks +shopt -s nullglob +# the order is important; "package" hooks must override same-named "user" hooks +for i in `$GL_BINDIR/gl-query-rc GL_ADMINDIR`/hooks/common/* \ + `$GL_BINDIR/gl-query-rc GL_PACKAGE_HOOKS `/common/* +do + ln -sf $i $GL_REPO_BASE_ABS/$to.git/hooks +done if [ -n "$GL_WILDREPOS_DEFPERMS" ]; then echo "$GL_WILDREPOS_DEFPERMS" > gl-perms |