diff options
author | David Aguilar <davvid@gmail.com> | 2010-01-22 22:03:36 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-01-22 22:07:29 -0800 |
commit | a88183f168660bb784baad536e44239a1f3dffb8 (patch) | |
tree | 95f441412d5b6cea3c802603ed4998fec823b493 | |
parent | aba7dea83bfba411dee0271491d6199d2dca61d9 (diff) | |
download | git-a88183f168660bb784baad536e44239a1f3dffb8.tar.gz git-a88183f168660bb784baad536e44239a1f3dffb8.tar.xz |
t7800-difftool.sh: Test mergetool.prompt fallback
4cacc621 made difftool fall back to mergetool.prompt
when difftool.prompt is unconfigured. This adds a test.
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-x | t/t7800-difftool.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t7800-difftool.sh b/t/t7800-difftool.sh index fad547225..19c72f55b 100755 --- a/t/t7800-difftool.sh +++ b/t/t7800-difftool.sh @@ -27,6 +27,7 @@ remove_config_vars() git config --unset difftool.prompt git config --unset merge.tool git config --unset mergetool.test-tool.cmd + git config --unset mergetool.prompt return 0 } @@ -159,6 +160,17 @@ test_expect_success 'difftool.prompt config variable is false' ' restore_test_defaults ' +# Test that we don't have to pass --no-prompt when mergetool.prompt is false +test_expect_success 'difftool merge.prompt = false' ' + git config --unset difftool.prompt + git config mergetool.prompt false && + + diff=$(git difftool branch) && + test "$diff" = "branch" && + + restore_test_defaults +' + # Test that the -y flag can override difftool.prompt = true test_expect_success 'difftool.prompt can overridden with -y' ' git config difftool.prompt true && |