aboutsummaryrefslogtreecommitdiff
path: root/git-hooks/loader.sh
blob: eadafa615e2483ef752fbf0a0caec34e70b47e87 (plain)
1
2
3
4
5
6
7
8
9
10
#!/bin/sh

set -e

hook="$1"
shift

gitdir="$(git rev-parse --git-dir)"
[ -x "$gitdir/hooks/own_$hook" ] && "$gitdir/hooks/own_$hook" "$@"
[ -x "$gitdir/../git-hooks/hooks/$hook" ] && "$gitdir/../git-hooks/hooks/$hook" "$@"