{"thread":{"id":"54842","subject":"[PATCH v3] mergetool: add automerge configuration","startedAt":"2020-12-17T05:46:24Z","lastAt":"2020-12-18T12:14:37Z","messageCount":7,"participants":["Felipe Contreras","Johannes Sixt","Junio C Hamano"],"isPatch":true,"patchVersion":3,"patchTotal":null},"messages":[{"id":"412478","messageId":"20201217054524.856258-1-felipe.contreras@gmail.com","threadId":"54842","inReplyTo":null,"subject":"[PATCH v3] mergetool: add automerge configuration","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2020-12-17T05:45:24Z","receivedAt":"2020-12-17T05:46:24Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"It doesn't make sense to display easily-solvable conflicts in the\ndifferent views of all mergetools.\n\nOnly the chunks that warrant conflict markers should be displayed.\n\nIn order to unobtrusively do this, add a new configuration:\nmergetool.autoMerge.\n\nSee Seth House's blog post [1] for the idea, and the rationale.\n\n[1] https://www.eseth.org/2020/mergetools.html\n\nOriginal-idea-by: Seth House <seth@eseth.com>\nSigned-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n---\n Documentation/config/mergetool.txt |  3 +++\n git-mergetool.sh                   | 10 ++++++++++\n t/t7610-mergetool.sh               | 18 ++++++++++++++++++\n 3 files changed, 31 insertions(+)\n\ndiff --git a/Documentation/config/mergetool.txt b/Documentation/config/mergetool.txt\nindex 16a27443a3..43af7a96f9 100644\n--- a/Documentation/config/mergetool.txt\n+++ b/Documentation/config/mergetool.txt\n@@ -61,3 +61,6 @@ mergetool.writeToTemp::\n \n mergetool.prompt::\n \tPrompt before each invocation of the merge resolution program.\n+\n+mergetool.autoMerge::\n+\tAutomatically resolve conflicts that don't require user intervention.\ndiff --git a/git-mergetool.sh b/git-mergetool.sh\nindex e3f6d543fb..6e86d3b492 100755\n--- a/git-mergetool.sh\n+++ b/git-mergetool.sh\n@@ -274,6 +274,7 @@ merge_file () {\n \t\tBASE=${BASE##*/}\n \tfi\n \n+\tDIFF3=\"$MERGETOOL_TMPDIR/${BASE}_DIFF3_$$$ext\"\n \tBACKUP=\"$MERGETOOL_TMPDIR/${BASE}_BACKUP_$$$ext\"\n \tLOCAL=\"$MERGETOOL_TMPDIR/${BASE}_LOCAL_$$$ext\"\n \tREMOTE=\"$MERGETOOL_TMPDIR/${BASE}_REMOTE_$$$ext\"\n@@ -322,6 +323,15 @@ merge_file () {\n \tcheckout_staged_file 2 \"$MERGED\" \"$LOCAL\"\n \tcheckout_staged_file 3 \"$MERGED\" \"$REMOTE\"\n \n+\tif test \"$(git config --bool mergetool.autoMerge)\" = \"true\"\n+\tthen\n+\t\tgit merge-file --diff3 -q -p \"$LOCAL\" \"$BASE\" \"$REMOTE\" >\"$DIFF3\"\n+\t\tsed -e '/^<<<<<<< /,/^||||||| /d' -e '/^=======\\r\\?$/,/^>>>>>>> /d' \"$DIFF3\" >\"$BASE\"\n+\t\tsed -e '/^||||||| /,/^>>>>>>> /d' -e '/^<<<<<<< /d' \"$DIFF3\" >\"$LOCAL\"\n+\t\tsed -e '/^<<<<<<< /,/^=======\\r\\?$/d' -e '/^>>>>>>> /d' \"$DIFF3\" >\"$REMOTE\"\n+\t\trm -- \"$DIFF3\"\n+\tfi\n+\n \tif test -z \"$local_mode\" || test -z \"$remote_mode\"\n \tthen\n \t\techo \"Deleted merge conflict for '$MERGED':\"\ndiff --git a/t/t7610-mergetool.sh b/t/t7610-mergetool.sh\nindex 70afdd06fa..b75c91199b 100755\n--- a/t/t7610-mergetool.sh\n+++ b/t/t7610-mergetool.sh\n@@ -828,4 +828,22 @@ test_expect_success 'mergetool -Oorder-file is honored' '\n \ttest_cmp expect actual\n '\n \n+test_expect_success 'mergetool automerge' '\n+\ttest_config mergetool.automerge true &&\n+\ttest_when_finished \"git reset --hard\" &&\n+\tgit checkout -b test${test_count}_b master &&\n+\techo -e \"base\\n\\na\" >file1 &&\n+\tgit commit -a -m \"base\" &&\n+\techo -e \"base\\n\\nc\" >file1 &&\n+\tgit commit -a -m \"remote update\" &&\n+\tgit checkout -b test${test_count}_a HEAD~ &&\n+\techo -e \"local\\n\\nb\" >file1 &&\n+\tgit commit -a -m \"local update\" &&\n+\ttest_must_fail git merge test${test_count}_b &&\n+\tyes \"\" | git mergetool file1 &&\n+\techo -e \"local\\n\\nc\" >expect &&\n+\ttest_cmp expect file1 &&\n+\tgit commit -m \"test resolved with mergetool\"\n+'\n+\n test_done\n-- \n2.30.0.rc0\n\n"},{"id":"412481","messageId":"769774cf-a55f-c9ba-c33d-233d070bb3f1@kdbg.org","threadId":"54842","inReplyTo":"20201217054524.856258-1-felipe.contreras@gmail.com","subject":"Re: [PATCH v3] mergetool: add automerge configuration","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2020-12-17T07:37:56Z","receivedAt":"2020-12-17T07:38:42Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 17.12.20 um 06:45 schrieb Felipe Contreras:\n> It doesn't make sense to display easily-solvable conflicts in the\n> different views of all mergetools.\n> \n> Only the chunks that warrant conflict markers should be displayed.\n> \n> In order to unobtrusively do this, add a new configuration:\n> mergetool.autoMerge.\n> \n> See Seth House's blog post [1] for the idea, and the rationale.\n> \n> [1] https://www.eseth.org/2020/mergetools.html\n> \n> Original-idea-by: Seth House <seth@eseth.com>\n> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n> ---\n>  Documentation/config/mergetool.txt |  3 +++\n>  git-mergetool.sh                   | 10 ++++++++++\n>  t/t7610-mergetool.sh               | 18 ++++++++++++++++++\n>  3 files changed, 31 insertions(+)\n> \n> diff --git a/Documentation/config/mergetool.txt b/Documentation/config/mergetool.txt\n> index 16a27443a3..43af7a96f9 100644\n> --- a/Documentation/config/mergetool.txt\n> +++ b/Documentation/config/mergetool.txt\n> @@ -61,3 +61,6 @@ mergetool.writeToTemp::\n>  \n>  mergetool.prompt::\n>  \tPrompt before each invocation of the merge resolution program.\n> +\n> +mergetool.autoMerge::\n> +\tAutomatically resolve conflicts that don't require user intervention.\n\nAs I hinted in an earlier message, some tools do know how to deal with\nunconflicted changes. This should be a setting in the tool driver, not a\nuser-visible setting.\n\n> diff --git a/git-mergetool.sh b/git-mergetool.sh\n> index e3f6d543fb..6e86d3b492 100755\n> --- a/git-mergetool.sh\n> +++ b/git-mergetool.sh\n> @@ -274,6 +274,7 @@ merge_file () {\n>  \t\tBASE=${BASE##*/}\n>  \tfi\n>  \n> +\tDIFF3=\"$MERGETOOL_TMPDIR/${BASE}_DIFF3_$$$ext\"\n>  \tBACKUP=\"$MERGETOOL_TMPDIR/${BASE}_BACKUP_$$$ext\"\n>  \tLOCAL=\"$MERGETOOL_TMPDIR/${BASE}_LOCAL_$$$ext\"\n>  \tREMOTE=\"$MERGETOOL_TMPDIR/${BASE}_REMOTE_$$$ext\"\n> @@ -322,6 +323,15 @@ merge_file () {\n>  \tcheckout_staged_file 2 \"$MERGED\" \"$LOCAL\"\n>  \tcheckout_staged_file 3 \"$MERGED\" \"$REMOTE\"\n>  \n> +\tif test \"$(git config --bool mergetool.autoMerge)\" = \"true\"\n> +\tthen\n> +\t\tgit merge-file --diff3 -q -p \"$LOCAL\" \"$BASE\" \"$REMOTE\" >\"$DIFF3\"\n> +\t\tsed -e '/^<<<<<<< /,/^||||||| /d' -e '/^=======\\r\\?$/,/^>>>>>>> /d' \"$DIFF3\" >\"$BASE\"\n> +\t\tsed -e '/^||||||| /,/^>>>>>>> /d' -e '/^<<<<<<< /d' \"$DIFF3\" >\"$LOCAL\"\n> +\t\tsed -e '/^<<<<<<< /,/^=======\\r\\?$/d' -e '/^>>>>>>> /d' \"$DIFF3\" >\"$REMOTE\"\n> +\t\trm -- \"$DIFF3\"\n> +\tfi\n> +\n>  \tif test -z \"$local_mode\" || test -z \"$remote_mode\"\n>  \tthen\n>  \t\techo \"Deleted merge conflict for '$MERGED':\"\n> diff --git a/t/t7610-mergetool.sh b/t/t7610-mergetool.sh\n> index 70afdd06fa..b75c91199b 100755\n> --- a/t/t7610-mergetool.sh\n> +++ b/t/t7610-mergetool.sh\n> @@ -828,4 +828,22 @@ test_expect_success 'mergetool -Oorder-file is honored' '\n>  \ttest_cmp expect actual\n>  '\n>  \n> +test_expect_success 'mergetool automerge' '\n> +\ttest_config mergetool.automerge true &&\n> +\ttest_when_finished \"git reset --hard\" &&\n> +\tgit checkout -b test${test_count}_b master &&\n> +\techo -e \"base\\n\\na\" >file1 &&\n> +\tgit commit -a -m \"base\" &&\n> +\techo -e \"base\\n\\nc\" >file1 &&\n> +\tgit commit -a -m \"remote update\" &&\n> +\tgit checkout -b test${test_count}_a HEAD~ &&\n> +\techo -e \"local\\n\\nb\" >file1 &&\n> +\tgit commit -a -m \"local update\" &&\n> +\ttest_must_fail git merge test${test_count}_b &&\n> +\tyes \"\" | git mergetool file1 &&\n> +\techo -e \"local\\n\\nc\" >expect &&\n> +\ttest_cmp expect file1 &&\n> +\tgit commit -m \"test resolved with mergetool\"\n> +'\n> +\n>  test_done\n> \n\n"},{"id":"412483","messageId":"5fdb175e79748_d35b620823@natae.notmuch","threadId":"54842","inReplyTo":"769774cf-a55f-c9ba-c33d-233d070bb3f1@kdbg.org","subject":"Re: [PATCH v3] mergetool: add automerge configuration","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2020-12-17T08:31:26Z","receivedAt":"2020-12-17T08:32:26Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"Johannes Sixt wrote:\n> Am 17.12.20 um 06:45 schrieb Felipe Contreras:\n> > It doesn't make sense to display easily-solvable conflicts in the\n> > different views of all mergetools.\n> > \n> > Only the chunks that warrant conflict markers should be displayed.\n> > \n> > In order to unobtrusively do this, add a new configuration:\n> > mergetool.autoMerge.\n> > \n> > See Seth House's blog post [1] for the idea, and the rationale.\n> > \n> > [1] https://www.eseth.org/2020/mergetools.html\n> > \n> > Original-idea-by: Seth House <seth@eseth.com>\n> > Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n> > ---\n> >  Documentation/config/mergetool.txt |  3 +++\n> >  git-mergetool.sh                   | 10 ++++++++++\n> >  t/t7610-mergetool.sh               | 18 ++++++++++++++++++\n> >  3 files changed, 31 insertions(+)\n> > \n> > diff --git a/Documentation/config/mergetool.txt b/Documentation/config/mergetool.txt\n> > index 16a27443a3..43af7a96f9 100644\n> > --- a/Documentation/config/mergetool.txt\n> > +++ b/Documentation/config/mergetool.txt\n> > @@ -61,3 +61,6 @@ mergetool.writeToTemp::\n> >  \n> >  mergetool.prompt::\n> >  \tPrompt before each invocation of the merge resolution program.\n> > +\n> > +mergetool.autoMerge::\n> > +\tAutomatically resolve conflicts that don't require user intervention.\n> \n> As I hinted in an earlier message, some tools do know how to deal with\n> unconflicted changes. This should be a setting in the tool driver, not a\n> user-visible setting.\n\nIt could be done in both. We first should find a mergetool that is\nnegatively affected by this, which WinMerge doesn't seem to be one of\nthem:\n\n 1. Before: https://snipboard.io/8JA5Oz.jpg\n 2. After: https://snipboard.io/HUXnOg.jpg\n\nThat's a positive effect after the patch.\n\n-- \nFelipe Contreras\n"},{"id":"412509","messageId":"xmqqk0tgx7ms.fsf@gitster.c.googlers.com","threadId":"54842","inReplyTo":"20201217054524.856258-1-felipe.contreras@gmail.com","subject":"Re: [PATCH v3] mergetool: add automerge configuration","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-12-18T00:47:23Z","receivedAt":"2020-12-18T00:49:02Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Felipe Contreras <felipe.contreras@gmail.com> writes:\n\n> It doesn't make sense to display easily-solvable conflicts in the\n> different views of all mergetools.\n>\n> Only the chunks that warrant conflict markers should be displayed.\n>\n> In order to unobtrusively do this, add a new configuration:\n> mergetool.autoMerge.\n\nAs pointed out by others, I think it makes more sense to have\nmergetool.$tool.autoMerge, with optionally mergetool.autoMerge\nthat can be used as a fallback, and enable it by default.  If\nwe can make the default of enabling/disabling per tool, that\nwould be ideal (see my other reply on how to do these).\n\n> +\t\tgit merge-file --diff3 -q -p \"$LOCAL\" \"$BASE\" \"$REMOTE\" >\"$DIFF3\"\n\nAdding \"--marker-size 7\" to the command line would make the sed\nscripts below more robust.\n\n> +\t\tsed -e '/^<<<<<<< /,/^||||||| /d' -e '/^=======\\r\\?$/,/^>>>>>>> /d' \"$DIFF3\" >\"$BASE\"\n> +\t\tsed -e '/^||||||| /,/^>>>>>>> /d' -e '/^<<<<<<< /d' \"$DIFF3\" >\"$LOCAL\"\n> +\t\tsed -e '/^<<<<<<< /,/^=======\\r\\?$/d' -e '/^>>>>>>> /d' \"$DIFF3\" >\"$REMOTE\"\n> +\t\trm -- \"$DIFF3\"\n> +\tfi\n> +\n>  \tif test -z \"$local_mode\" || test -z \"$remote_mode\"\n>  \tthen\n>  \t\techo \"Deleted merge conflict for '$MERGED':\"\n> diff --git a/t/t7610-mergetool.sh b/t/t7610-mergetool.sh\n> index 70afdd06fa..b75c91199b 100755\n> --- a/t/t7610-mergetool.sh\n> +++ b/t/t7610-mergetool.sh\n> @@ -828,4 +828,22 @@ test_expect_success 'mergetool -Oorder-file is honored' '\n>  \ttest_cmp expect actual\n>  '\n>  \n> +test_expect_success 'mergetool automerge' '\n> +\ttest_config mergetool.automerge true &&\n> +\ttest_when_finished \"git reset --hard\" &&\n> +\tgit checkout -b test${test_count}_b master &&\n> +\techo -e \"base\\n\\na\" >file1 &&\n\nI think test-lint-shell-syntax should have complained about the use\nof \"echo -e\" here (that's the reason why I queued the patch in 'seen'\ninitially but it does not appear in what finally got pushed out).\n\nYou can either use the plain-vanilla\n\n\tcat >file1 <<-\\EOF &&\n\t...\n\tEOF\n\nbecause there is nothing gained by saving number of lines with\nreduced readability, or can use\n\n\ttest_write_lines >file1 base \"\" \"\" a &&\n\t...\n\ttest_write_lines >file1 base \"\" \"\" c &&\n\t...\n\ttest_write_lines >file1 local \"\" \"\" b &&\n\t...\n\ttest_write_lines >file1 local \"\" \"\" c &&\n\t...\n\nwhich would both save number of lines while making it a bit clearer\nwhich 'line' corresponds to which other 'line' in different\npreparation of the same \"file1\".\n\nWill expect a reroll.  Thanks.\n\n> +\tgit commit -a -m \"base\" &&\n> +\techo -e \"base\\n\\nc\" >file1 &&\n> +\tgit commit -a -m \"remote update\" &&\n> +\tgit checkout -b test${test_count}_a HEAD~ &&\n> +\techo -e \"local\\n\\nb\" >file1 &&\n> +\tgit commit -a -m \"local update\" &&\n> +\ttest_must_fail git merge test${test_count}_b &&\n> +\tyes \"\" | git mergetool file1 &&\n> +\techo -e \"local\\n\\nc\" >expect &&\n> +\ttest_cmp expect file1 &&\n> +\tgit commit -m \"test resolved with mergetool\"\n> +'\n> +\n>  test_done\n"},{"id":"412516","messageId":"5fdc16b8de8c1_f2faf208ad@natae.notmuch","threadId":"54842","inReplyTo":"xmqqk0tgx7ms.fsf@gitster.c.googlers.com","subject":"Re: [PATCH v3] mergetool: add automerge configuration","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2020-12-18T02:40:56Z","receivedAt":"2020-12-18T02:41:41Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"Junio C Hamano wrote:\n> Felipe Contreras <felipe.contreras@gmail.com> writes:\n> \n> > It doesn't make sense to display easily-solvable conflicts in the\n> > different views of all mergetools.\n> >\n> > Only the chunks that warrant conflict markers should be displayed.\n> >\n> > In order to unobtrusively do this, add a new configuration:\n> > mergetool.autoMerge.\n> \n> As pointed out by others, I think it makes more sense to have\n> mergetool.$tool.autoMerge, with optionally mergetool.autoMerge\n> that can be used as a fallback, and enable it by default.  If\n> we can make the default of enabling/disabling per tool, that\n> would be ideal (see my other reply on how to do these).\n\nI don't think that's the case. There is no tool the user wouldn't want\nthis enabled on.\n\n> > +\t\tgit merge-file --diff3 -q -p \"$LOCAL\" \"$BASE\" \"$REMOTE\" >\"$DIFF3\"\n> \n> Adding \"--marker-size 7\" to the command line would make the sed\n> scripts below more robust.\n\nRight, althought the user can't configure otherwise, and the default 7,\nit can't hurt to add it.\n\n> > +\t\tsed -e '/^<<<<<<< /,/^||||||| /d' -e '/^=======\\r\\?$/,/^>>>>>>> /d' \"$DIFF3\" >\"$BASE\"\n> > +\t\tsed -e '/^||||||| /,/^>>>>>>> /d' -e '/^<<<<<<< /d' \"$DIFF3\" >\"$LOCAL\"\n> > +\t\tsed -e '/^<<<<<<< /,/^=======\\r\\?$/d' -e '/^>>>>>>> /d' \"$DIFF3\" >\"$REMOTE\"\n> > +\t\trm -- \"$DIFF3\"\n> > +\tfi\n> > +\n> >  \tif test -z \"$local_mode\" || test -z \"$remote_mode\"\n> >  \tthen\n> >  \t\techo \"Deleted merge conflict for '$MERGED':\"\n> > diff --git a/t/t7610-mergetool.sh b/t/t7610-mergetool.sh\n> > index 70afdd06fa..b75c91199b 100755\n> > --- a/t/t7610-mergetool.sh\n> > +++ b/t/t7610-mergetool.sh\n> > @@ -828,4 +828,22 @@ test_expect_success 'mergetool -Oorder-file is honored' '\n> >  \ttest_cmp expect actual\n> >  '\n> >  \n> > +test_expect_success 'mergetool automerge' '\n> > +\ttest_config mergetool.automerge true &&\n> > +\ttest_when_finished \"git reset --hard\" &&\n> > +\tgit checkout -b test${test_count}_b master &&\n> > +\techo -e \"base\\n\\na\" >file1 &&\n> \n> I think test-lint-shell-syntax should have complained about the use\n> of \"echo -e\" here (that's the reason why I queued the patch in 'seen'\n> initially but it does not appear in what finally got pushed out).\n> \n> You can either use the plain-vanilla\n> \n> \tcat >file1 <<-\\EOF &&\n> \t...\n> \tEOF\n> \n> because there is nothing gained by saving number of lines with\n> reduced readability, or can use\n> \n> \ttest_write_lines >file1 base \"\" \"\" a &&\n> \t...\n> \ttest_write_lines >file1 base \"\" \"\" c &&\n> \t...\n> \ttest_write_lines >file1 local \"\" \"\" b &&\n> \t...\n> \ttest_write_lines >file1 local \"\" \"\" c &&\n> \t...\n\nIt's only one \"\", but OK.\n\n> which would both save number of lines while making it a bit clearer\n> which 'line' corresponds to which other 'line' in different\n> preparation of the same \"file1\".\n> \n> Will expect a reroll.  Thanks.\n\nI have the next version ready, I'll wait for feedback from Seth\nregarding tools that might want this turned off (which in my opinion are\nzero).\n\nCheers.\n\n-- \nFelipe Contreras\n"},{"id":"412549","messageId":"xmqqwnxftnbk.fsf@gitster.c.googlers.com","threadId":"54842","inReplyTo":"5fdc16b8de8c1_f2faf208ad@natae.notmuch","subject":"Re: [PATCH v3] mergetool: add automerge configuration","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-12-18T10:34:23Z","receivedAt":"2020-12-18T10:35:23Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Felipe Contreras <felipe.contreras@gmail.com> writes:\n\n> Right, althought the user can't configure otherwise, and the default 7,\n> it can't hurt to add it.\n\nYes, that would make it certain that the code would survive the\nchange in the underlying xmerge part of the system.\n\nI am still not sure what the right plan to deal with conflicts\nrecorded in the virtual ancestor.  Do we just close our eyes and\nignore it?\n\nAn easy way out may be to give an command line override so that\nusers can easily re-run mergetool with the feature disabled only for\na single invocation that went wrong, which would make it less likely\nthat users disable the feature permanently upon seeing just one case\nof the new logic getting confused.\n"},{"id":"412553","messageId":"5fdc9d00bffd8_104e15208ef@natae.notmuch","threadId":"54842","inReplyTo":"xmqqwnxftnbk.fsf@gitster.c.googlers.com","subject":"Re: [PATCH v3] mergetool: add automerge configuration","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2020-12-18T12:13:52Z","receivedAt":"2020-12-18T12:14:37Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"Junio C Hamano wrote:\n> Felipe Contreras <felipe.contreras@gmail.com> writes:\n> \n> > Right, althought the user can't configure otherwise, and the default 7,\n> > it can't hurt to add it.\n> \n> Yes, that would make it certain that the code would survive the\n> change in the underlying xmerge part of the system.\n\nYes.\n\n> I am still not sure what the right plan to deal with conflicts\n> recorded in the virtual ancestor.  Do we just close our eyes and\n> ignore it?\n\nThis is what we already do.\n\nWhen a file has changes that don't bump into each other they are not\nconsidered conflicts, for example:\n\n BASE:   sentence\n LOCAL:  sentence\n REMOTE: sentence.\n\nIs that a conflict?\n\nWhether you call these \"trivial conflicts\", or \"non-conflicts\" doesn't\nmatter, if the file only has changes of this kind, git considers the\nfile merged automatically.\n\nIf the merge has *all* changes of this kind, then the it is\nautomatically completed. No mergetool necessary.\n\n> An easy way out may be to give an command line override so that\n> users can easily re-run mergetool with the feature disabled only for\n> a single invocation that went wrong,\n\nWhy would it go wrong?\n\nGit has already determined there's no conflict.\n\nDoes it make sense to run \"git mergetool\n--consider-all-changes-as-conflicts\" and go back in time before the\ncommit merge that had no conflicts was done, and run mergetool on all\nthe files that contain changes, even if git initially considered the\nfile as merged (since they contained no \"true\" conflicts)?\n\nWhen does it make sense to open an instance of the mergetool on a file\nthat contains *zero* conflict markers?\n\n-- \nFelipe Contreras\n"}]}