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>
Phillip Wood committed
Jan 24, 2018 at 12:34 UTC
4f8cbf2b46c22c4078ae0be1b6460d2eb100b21d
1 file changed
+8
-6
t/t7505-prepare-commit-msg-hook.sh
+8
-6
@@ -31,15 +31,17 @@ mkdir -p "$HOOKDIR"
31
echo "#!$SHELL_PATH" > "$HOOK"
32
cat >> "$HOOK" <<'EOF'
33
34
-if test "$2" = commit; then
35
- source=$(git rev-parse "$3")
34
+if test "$2" = commit
35
+then
36
+ source=$(git rev-parse "$3")
37
else
37
- source=${2-default}
38
+ source=${2-default}
39
fi
39
-if test "$GIT_EDITOR" = :; then
40
- sed -e "1s/.*/$source (no editor)/" "$1" > msg.tmp
40
+if test "$GIT_EDITOR" = :
41
+then
42
+ sed -e "1s/.*/$source (no editor)/" "$1" >msg.tmp
43
else
42
- sed -e "1s/.*/$source/" "$1" > msg.tmp
44
+ sed -e "1s/.*/$source/" "$1" >msg.tmp
45
fi
46
mv msg.tmp "$1"
47
exit 0