зеркало из https://github.com/microsoft/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 <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
32aedd5496
Коммит
462f8caf24
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче