Skip to content

Commit 23218bb

Browse files
davvidgitster
authored andcommitted
t7800-difftool: Set a bogus tool for use by tests
If a difftool test has an error then running the git test suite may end up invoking a GUI diff tool. We now guard against this by setting a difftool.bogus-tool.cmd variable. The tests already used --tool=bogus-tool in various places so this is simply ensuring that nothing ever falls back and finds a real diff tool. Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 902f235 commit 23218bb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

t/t7800-difftool.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ restore_test_defaults()
3636
unset GIT_DIFFTOOL_NO_PROMPT
3737
git config diff.tool test-tool &&
3838
git config difftool.test-tool.cmd 'cat $LOCAL'
39+
git config difftool.bogus-tool.cmd false
3940
}
4041

4142
prompt_given()
@@ -71,7 +72,7 @@ test_expect_success 'custom commands' '
7172

7273
# Ensures that git-difftool ignores bogus --tool values
7374
test_expect_success 'difftool ignores bad --tool values' '
74-
diff=$(git difftool --no-prompt --tool=bogus-tool branch)
75+
diff=$(git difftool --no-prompt --tool=bad-tool branch)
7576
test "$?" = 1 &&
7677
test "$diff" = ""
7778
'

0 commit comments

Comments
 (0)