diff options
author | Denton Liu <liu.denton@gmail.com> | 2019-04-29 02:21:20 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-05-13 23:11:59 +0900 |
commit | 6c22d715e7b4067a6865ff3fbceab991d0042c12 (patch) | |
tree | 9d8f81d3a69a7b3f7924ff35e91f6af0da7f4b7d /t/t7800-difftool.sh | |
parent | 7f978d7d10a87c4a56ea3101b936cddb25bbe2c6 (diff) | |
download | git-6c22d715e7b4067a6865ff3fbceab991d0042c12.tar.gz |
difftool: fallback on merge.guitool
In git-difftool.txt, it says
'git difftool' falls back to 'git mergetool' config variables when the
difftool equivalents have not been defined.
However, when `diff.guitool` is missing, it doesn't fallback to
anything. Make git-difftool fallback to `merge.guitool` when `diff.guitool` is
missing.
Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7800-difftool.sh')
-rwxr-xr-x | t/t7800-difftool.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/t/t7800-difftool.sh b/t/t7800-difftool.sh index 833e175bf9..48b74c0434 100755 --- a/t/t7800-difftool.sh +++ b/t/t7800-difftool.sh @@ -279,11 +279,27 @@ test_expect_success 'difftool + mergetool config variables' ' echo branch >expect && git difftool --no-prompt branch >actual && test_cmp expect actual && + git difftool --gui --no-prompt branch >actual && + test_cmp expect actual && # set merge.tool to something bogus, diff.tool to test-tool test_config merge.tool bogus-tool && test_config diff.tool test-tool && git difftool --no-prompt branch >actual && + test_cmp expect actual && + git difftool --gui --no-prompt branch >actual && + test_cmp expect actual && + + # set merge.tool, diff.tool to something bogus, merge.guitool to test-tool + test_config diff.tool bogus-tool && + test_config merge.guitool test-tool && + git difftool --gui --no-prompt branch >actual && + test_cmp expect actual && + + # set merge.tool, diff.tool, merge.guitool to something bogus, diff.guitool to test-tool + test_config merge.guitool bogus-tool && + test_config diff.guitool test-tool && + git difftool --gui --no-prompt branch >actual && test_cmp expect actual ' |