diff --git a/doc/monkeysphere.mkd b/doc/monkeysphere.mkd index 3497073..e42cab1 100644 --- a/doc/monkeysphere.mkd +++ b/doc/monkeysphere.mkd @@ -56,7 +56,7 @@ gitolite put your new hook in the correct place. ADMIN_POST_UPDATE_CHAINS_TO=hooks/post-update.tertiary - if [[ -f $ADMIN_POST_UPDATE_CHAINS_TO || -L $ADMIN_POST_UPDATE_CHAINS_TO ]]; then + if [[ -x $ADMIN_POST_UPDATE_CHAINS_TO ]]; then exec $ADMIN_POST_UPDATE_CHAINS_TO "$@" fi diff --git a/hooks/common/update b/hooks/common/update index c264d22..2065a04 100755 --- a/hooks/common/update +++ b/hooks/common/update @@ -88,9 +88,7 @@ check_ref (\@allowed_refs, $ENV{GL_REPO}, $_ , $att_acc # if we returned at all, all the checks succeeded. Check secondary hooks now $UPDATE_CHAINS_TO ||= 'hooks/update.secondary'; -( -f $UPDATE_CHAINS_TO or -l $UPDATE_CHAINS_TO ) - and system ( $UPDATE_CHAINS_TO, @ARGV ) - and die "$UPDATE_CHAINS_TO died\n"; +-x $UPDATE_CHAINS_TO and system ( $UPDATE_CHAINS_TO, @ARGV ) and die "$UPDATE_CHAINS_TO died\n"; # now log it and exit 0 so git can get on with it log_it("", "$att_acc\t" . substr($oldsha, 0, 14) . "\t" . substr($newsha, 0, 14) . diff --git a/hooks/gitolite-admin/post-update b/hooks/gitolite-admin/post-update index b7cbbb0..62cd647 100755 --- a/hooks/gitolite-admin/post-update +++ b/hooks/gitolite-admin/post-update @@ -26,7 +26,7 @@ cd $od ADMIN_POST_UPDATE_CHAINS_TO=`$GL_BINDIR/gl-query-rc ADMIN_POST_UPDATE_CHAINS_TO` [ -n "$ADMIN_POST_UPDATE_CHAINS_TO" ] || ADMIN_POST_UPDATE_CHAINS_TO=hooks/post-update.secondary -if [ -f $ADMIN_POST_UPDATE_CHAINS_TO ] || [ -L $ADMIN_POST_UPDATE_CHAINS_TO ] +if [ -x $ADMIN_POST_UPDATE_CHAINS_TO ] then exec $ADMIN_POST_UPDATE_CHAINS_TO "$@" fi