Skip to content
Find file
845f35f Jun 19, 2012
executable file 28 lines (21 sloc) 635 Bytes
# Runs all executable pre-commit-* hooks and exits after,
# if any of them was not successful.
# Based on
hookname=`basename $0`
# Run each hook, passing through STDIN and storing the exit code.
# We don't want to bail at the first failure, as the user might
# then bypass the hooks without knowing about additional issues.
for hook in $GIT_DIR/hooks/$hookname-*; do
test -x "$hook" || continue
echo "$data" | "$hook"
# If any exit code isn't 0, bail.
for i in "${exitcodes[@]}"; do
[ "$i" == 0 ] || exit $i
Something went wrong with that request. Please try again.