From: Jeff King Date: Wed, 12 Mar 2008 21:42:43 +0000 (-0400) Subject: t7505: use SHELL_PATH in hook X-Git-Tag: v1.5.5-rc0~5^2~1 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=462f8caf248178121ef705dd1b6980eb3b846833;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/t/t7505-prepare-commit-msg-hook.sh b/t/t7505-prepare-commit-msg-hook.sh index 7ddec99a6..802aa624d 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