Skip to content

Commit fdd7aa1

Browse files
davvidgitster
authored andcommitted
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>
1 parent cee4268 commit fdd7aa1

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

git-difftool--helper.sh

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ TOOL_MODE=diff
1313
should_prompt () {
1414
prompt_merge=$(git config --bool mergetool.prompt || echo true)
1515
prompt=$(git config --bool difftool.prompt || echo $prompt_merge)
16-
if test "$prompt" = true; then
16+
if test "$prompt" = true
17+
then
1718
test -z "$GIT_DIFFTOOL_NO_PROMPT"
1819
else
1920
test -n "$GIT_DIFFTOOL_PROMPT"
@@ -37,9 +38,11 @@ launch_merge_tool () {
3738

3839
# $LOCAL and $REMOTE are temporary files so prompt
3940
# the user with the real $MERGED name before launching $merge_tool.
40-
if should_prompt; then
41+
if should_prompt
42+
then
4143
printf "\nViewing: '$MERGED'\n"
42-
if use_ext_cmd; then
44+
if use_ext_cmd
45+
then
4346
printf "Hit return to launch '%s': " \
4447
"$GIT_DIFFTOOL_EXTCMD"
4548
else
@@ -48,16 +51,19 @@ launch_merge_tool () {
4851
read ans
4952
fi
5053

51-
if use_ext_cmd; then
54+
if use_ext_cmd
55+
then
5256
export BASE
5357
eval $GIT_DIFFTOOL_EXTCMD '"$LOCAL"' '"$REMOTE"'
5458
else
5559
run_merge_tool "$merge_tool"
5660
fi
5761
}
5862

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
6167
merge_tool="$GIT_DIFF_TOOL"
6268
else
6369
merge_tool="$(get_merge_tool)" || exit

0 commit comments

Comments
 (0)