aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-12-10 10:04:53 +0900
committerJunio C Hamano <gitster@pobox.com>2024-12-10 10:04:53 +0900
commit9cd1e2e1a0350a3b6cbc4bcd268f0cbbe8c89687 (patch)
tree60dc05a152f544ebaae8732e43ae6d556a77a448 /t
parentMerge branch 'jc/doc-opt-tilde-expand' (diff)
parentgit-difftool--helper.sh: exit upon initialize_merge_tool errors (diff)
downloadgit-9cd1e2e1a0350a3b6cbc4bcd268f0cbbe8c89687.tar.gz
git-9cd1e2e1a0350a3b6cbc4bcd268f0cbbe8c89687.zip
Merge branch 'pb/mergetool-errors'
End-user experience of "git mergetool" when the command errors out has been improved. * pb/mergetool-errors: git-difftool--helper.sh: exit upon initialize_merge_tool errors git-mergetool--lib.sh: add error message for unknown tool variant git-mergetool--lib.sh: add error message if 'setup_user_tool' fails git-mergetool--lib.sh: use TOOL_MODE when erroring about unknown tool completion: complete '--tool-help' in 'git mergetool'
Diffstat (limited to 't')
-rwxr-xr-xt/t7610-mergetool.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t7610-mergetool.sh b/t/t7610-mergetool.sh
index 22b3a85b3e..c077aba7ce 100755
--- a/t/t7610-mergetool.sh
+++ b/t/t7610-mergetool.sh
@@ -898,4 +898,12 @@ test_expect_success 'mergetool with guiDefault' '
git commit -m "branch1 resolved with mergetool"
'
+test_expect_success 'mergetool with non-existent tool' '
+ test_when_finished "git reset --hard" &&
+ git checkout -b test$test_count branch1 &&
+ test_must_fail git merge main &&
+ yes "" | test_must_fail git mergetool --tool=absent >out 2>&1 &&
+ test_grep "mergetool.absent.cmd not set for tool" out
+'
+
test_done