oopsies... should be checking for "-x" not just "-f or -l" to chain a hook
it was trying to execute a broken symlink! (Thanks to Jeff of KDE for catching this)
This commit is contained in:
parent
b706719a56
commit
a6a0db10e9
|
@ -56,7 +56,7 @@ gitolite put your new hook in the correct place.
|
||||||
|
|
||||||
ADMIN_POST_UPDATE_CHAINS_TO=hooks/post-update.tertiary
|
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 "$@"
|
exec $ADMIN_POST_UPDATE_CHAINS_TO "$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -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
|
# if we returned at all, all the checks succeeded. Check secondary hooks now
|
||||||
$UPDATE_CHAINS_TO ||= 'hooks/update.secondary';
|
$UPDATE_CHAINS_TO ||= 'hooks/update.secondary';
|
||||||
( -f $UPDATE_CHAINS_TO or -l $UPDATE_CHAINS_TO )
|
-x $UPDATE_CHAINS_TO and system ( $UPDATE_CHAINS_TO, @ARGV ) and die "$UPDATE_CHAINS_TO died\n";
|
||||||
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
|
# 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) .
|
log_it("", "$att_acc\t" . substr($oldsha, 0, 14) . "\t" . substr($newsha, 0, 14) .
|
||||||
|
|
|
@ -26,7 +26,7 @@ cd $od
|
||||||
ADMIN_POST_UPDATE_CHAINS_TO=`$GL_BINDIR/gl-query-rc ADMIN_POST_UPDATE_CHAINS_TO`
|
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
|
[ -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
|
then
|
||||||
exec $ADMIN_POST_UPDATE_CHAINS_TO "$@"
|
exec $ADMIN_POST_UPDATE_CHAINS_TO "$@"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue