forked from tangled.org/core
this repo has no description

hook: fix GIT_DIR in delegate script

$PWD gives us the absolute path to the git repository without using the
bash builtin.

Signed-off-by: oppiliappan <me@oppi.li>

Changed files
+1 -1
hook
+1 -1
hook/setup.go
···
data=$(cat)
exitcodes=""
hookname=$(basename $0)
-
GIT_DIR=${GIT_DIR:-$(dirname $0)/..}
for hook in ${GIT_DIR}/hooks/${hookname}.d/*; do
test -x "${hook}" && test -f "${hook}" || continue
···
data=$(cat)
exitcodes=""
hookname=$(basename $0)
+
GIT_DIR="$PWD"
for hook in ${GIT_DIR}/hooks/${hookname}.d/*; do
test -x "${hook}" && test -f "${hook}" || continue