summaryrefslogtreecommitdiff
path: root/t/t7610-mergetool.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2021-02-17 17:21:41 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-02-17 17:21:41 -0800
commit78a26cb7204ddb96a5f75f09e41fbefd81c85f59 (patch)
tree712a759422ee38d5e4d4a49720a532f96833a3e3 /t/t7610-mergetool.sh
parentMerge branch 'jt/trace2-BUG' (diff)
parentmergetool: add per-tool support and overrides for the hideResolved flag (diff)
downloadtgif-78a26cb7204ddb96a5f75f09e41fbefd81c85f59.tar.xz
Merge branch 'sh/mergetool-hideresolved'
"git mergetool" feeds three versions (base, local and remote) of a conflicted path unmodified. The command learned to optionally prepare these files with unconflicted parts already resolved. * sh/mergetool-hideresolved: mergetool: add per-tool support and overrides for the hideResolved flag mergetool: break setup_tool out into separate initialization function mergetool: add hideResolved configuration
Diffstat (limited to 't/t7610-mergetool.sh')
-rwxr-xr-xt/t7610-mergetool.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/t/t7610-mergetool.sh b/t/t7610-mergetool.sh
index 04b0095072..8cc64729ad 100755
--- a/t/t7610-mergetool.sh
+++ b/t/t7610-mergetool.sh
@@ -842,4 +842,22 @@ test_expect_success 'mergetool --tool-help shows recognized tools' '
grep meld mergetools
'
+test_expect_success 'mergetool hideResolved' '
+ test_config mergetool.hideResolved true &&
+ test_when_finished "git reset --hard" &&
+ git checkout -b test${test_count}_b main &&
+ test_write_lines >file1 base "" a &&
+ git commit -a -m "base" &&
+ test_write_lines >file1 base "" c &&
+ git commit -a -m "remote update" &&
+ git checkout -b test${test_count}_a HEAD~ &&
+ test_write_lines >file1 local "" b &&
+ git commit -a -m "local update" &&
+ test_must_fail git merge test${test_count}_b &&
+ yes "" | git mergetool file1 &&
+ test_write_lines >expect local "" c &&
+ test_cmp expect file1 &&
+ git commit -m "test resolved with mergetool"
+'
+
test_done