difftool--helper: Make style consistent with git

Use the predominant conditional style where "then" appears alone on the line after the test expression. Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

David Aguilar committed Aug 18, 2011 at 00:23 UTC fdd7aa17f805b376f49a1bf031bf1b88eec89ddf
1 file changed +12 -6
git-difftool--helper.sh
+12 -6
@@ -13,7 +13,8 @@ TOOL_MODE=diff
13 should_prompt () {
14 prompt_merge=$(git config --bool mergetool.prompt || echo true)
15 prompt=$(git config --bool difftool.prompt || echo $prompt_merge)
16 - if test "$prompt" = true; then
16 + if test "$prompt" = true
17 + then
18 test -z "$GIT_DIFFTOOL_NO_PROMPT"
19 else
20 test -n "$GIT_DIFFTOOL_PROMPT"
@@ -37,9 +38,11 @@ launch_merge_tool () {
38
39 # $LOCAL and $REMOTE are temporary files so prompt
40 # the user with the real $MERGED name before launching $merge_tool.
40 - if should_prompt; then
41 + if should_prompt
42 + then
43 printf "\nViewing: '$MERGED'\n"
42 - if use_ext_cmd; then
44 + if use_ext_cmd
45 + then
46 printf "Hit return to launch '%s': " \
47 "$GIT_DIFFTOOL_EXTCMD"
48 else
@@ -48,7 +51,8 @@ launch_merge_tool () {
51 read ans
52 fi
53
51 - if use_ext_cmd; then
54 + if use_ext_cmd
55 + then
56 export BASE
57 eval $GIT_DIFFTOOL_EXTCMD '"$LOCAL"' '"$REMOTE"'
58 else
@@ -56,8 +60,10 @@ launch_merge_tool () {
60 fi
61 }
62
59 -if ! use_ext_cmd; then
60 - if test -n "$GIT_DIFF_TOOL"; then
63 +if ! use_ext_cmd
64 +then
65 + if test -n "$GIT_DIFF_TOOL"
66 + then
67 merge_tool="$GIT_DIFF_TOOL"
68 else
69 merge_tool="$(get_merge_tool)" || exit