summaryrefslogtreecommitdiff
path: root/t/t7505-prepare-commit-msg-hook.sh
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2008-03-12 17:42:43 -0400
committerJunio C Hamano <gitster@pobox.com>2008-03-13 00:57:53 -0700
commit462f8caf248178121ef705dd1b6980eb3b846833 (patch)
treec382b3f62733f76c46bbd4c5979a48f35ce277f8 /t/t7505-prepare-commit-msg-hook.sh
parent32aedd5496f53c08bcef5f7709f6bfece4f40978 (diff)
downloadgit-462f8caf248178121ef705dd1b6980eb3b846833.tar.gz
t7505: use SHELL_PATH in hook
The hook doesn't run properly under Solaris /bin/sh. Let's use the SHELL_PATH the user told us about already instead. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7505-prepare-commit-msg-hook.sh')
-rwxr-xr-xt/t7505-prepare-commit-msg-hook.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/t/t7505-prepare-commit-msg-hook.sh b/t/t7505-prepare-commit-msg-hook.sh
index 7ddec99a64..802aa624d0 100755
--- a/t/t7505-prepare-commit-msg-hook.sh
+++ b/t/t7505-prepare-commit-msg-hook.sh
@@ -25,8 +25,9 @@ export FAKE_EDITOR
HOOKDIR="$(git rev-parse --git-dir)/hooks"
HOOK="$HOOKDIR/prepare-commit-msg"
mkdir -p "$HOOKDIR"
-cat > "$HOOK" <<'EOF'
-#!/bin/sh
+echo "#!$SHELL_PATH" > "$HOOK"
+cat >> "$HOOK" <<'EOF'
+
if test "$2" = commit; then
source=$(git-rev-parse "$3")
else