diff options
author | Phillip Wood <phillip.wood@dunelm.org.uk> | 2018-01-24 12:34:20 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-01-24 11:00:16 -0800 |
commit | 4f8cbf2b46c22c4078ae0be1b6460d2eb100b21d (patch) | |
tree | e477d7f7f94e4682422d659342385fb5731d72d4 | |
parent | ed1e52822ea4a8493855d9b8be1049d561946137 (diff) | |
download | git-4f8cbf2b46c22c4078ae0be1b6460d2eb100b21d.tar.gz |
t7505: style fixes
Fix the indentation and style of the hook script in preparation for
further changes.
Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-x | t/t7505-prepare-commit-msg-hook.sh | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/t/t7505-prepare-commit-msg-hook.sh b/t/t7505-prepare-commit-msg-hook.sh index b13f72975e..cef709555e 100755 --- a/t/t7505-prepare-commit-msg-hook.sh +++ b/t/t7505-prepare-commit-msg-hook.sh @@ -31,15 +31,17 @@ mkdir -p "$HOOKDIR" echo "#!$SHELL_PATH" > "$HOOK" cat >> "$HOOK" <<'EOF' -if test "$2" = commit; then - source=$(git rev-parse "$3") +if test "$2" = commit +then + source=$(git rev-parse "$3") else - source=${2-default} + source=${2-default} fi -if test "$GIT_EDITOR" = :; then - sed -e "1s/.*/$source (no editor)/" "$1" > msg.tmp +if test "$GIT_EDITOR" = : +then + sed -e "1s/.*/$source (no editor)/" "$1" >msg.tmp else - sed -e "1s/.*/$source/" "$1" > msg.tmp + sed -e "1s/.*/$source/" "$1" >msg.tmp fi mv msg.tmp "$1" exit 0 |