Skip to content

Commit

Permalink
t7505: use SHELL_PATH in hook
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jeff King authored and Junio C Hamano committed Mar 13, 2008
1 parent 32aedd5 commit 462f8ca
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions t/t7505-prepare-commit-msg-hook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 462f8ca

Please sign in to comment.