git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 7/7] xdiff: make diff3 the default conflictStyle

From
Elijah Newren <newren@gmail.com>
Date
Jun 11, 2021, 17:57 UTC
Message-ID
<CABPp-BGtYnVPijg2OWoDBM915-PPFXk1O3H=BMf_itc4dNjAxQ@mail.gmail.com>
In-Reply-To
<60c39e1c52c04_8d0f208b2@natae.notmuch>

On Fri, Jun 11, 2021 at 10:32 AM Felipe Contreras <felipe.contreras@gmail.com> wrote:

Show 25 quoted lines
>
> Elijah Newren wrote:
> > On Fri, Jun 11, 2021 at 7:25 AM Felipe Contreras <felipe.contreras@gmail.com>
> > wrote:
>
> > > Personally I have never experienced what you posted, so maybe there's
> > > something else happening behind the scenes.
> > >
> > > Maybe merge-ort changed something.
> >
> > merge-ort made no changes relative to content merges or choice of merge
> > bases.  (In fact, merge ort doesn't even handle content merges; that's the
> > xdiff layer.)  Even if merge-ort had made changes in this area, merge-ort
> > is not the default and I didn't see the necessary config tweaks in your
> > list of config options.  (I would have recommended against people using
> > merge ort until 7bec8e7fa6 ("Merge branch 'en/ort-readiness'", 2021-04-16),
> > which only made it into a release last week with 2.32.  I probably won't be
> > recommending it as the default at least until the optimization work is
> > merged and it's hard to predict how many more months that will take.)
>
> Indeed, I tested on v2.25 and found the same output.
>
> I thought of merge-ort because 1) I've never seen such kind of output
> before, and 2) grepping the code I thought I saw merge-ort being the
> default of something, but now I seem to be unable to find where.

We have briefly discussed multiple times what things might be needed to eventually make merge-ort the default (though it's not even complete yet; I'm five months into upstreaming the optimization patches with an unknown number of months left). There were also a couple patches to make the _tests_ default to using merge-ort on most platforms, while still keeping one suite that tests merge-recursive to ensure we don't add breakage. Perhaps one of those is what you're thinking of?

Show 7 quoted lines
> > It's more likely that the codebases you work with just don't have
> > criss-cross merges.
>
> Yes, that's it.
>
> I don't see why people in these kinds of codebases would like diff3
> doing that by default.

I suspect they don't[1]. What's the alternative, though? Not using diff3? Picking a different base to avoid the occasional nested conflict in the inner merge region, but which overall has much worse other side effects? I think Junio was addressing this when he recently said elsewhere in this thread that "Rejecting diff3 style output because of the way a conflicted part in the inner merge appears as a common ancestor version may be throwing the baby out with the bathwater"[2]. Sure, it's an annoyance, but diff3 is still a good option and there is no current solution to the annoying nested merge display.

Also, not sure whether it matters or not, but just for completeness I should point out that you can get nested conflict markers without criss-cross merges and without merge.conflictStyle=diff3. It's just much more rare.

[1] https://lore.kernel.org/git/CAPc5daUC+6cHpexXTO24p4mG_5eL1JmxrYm8h3UfdTh_FMka=w@mail.gmail.com/ [2] https://lore.kernel.org/git/xmqqh7i5ci3t.fsf@gitster.g/

Previous: Felipe ContrerasNext: Felipe Contreras
Message 63 of 69 in “Make diff3 the default conflict style”
  1. 0/7 Make diff3 the default conflict styleFelipe Contreras, Jun 9, 2021
  2. 1/7 test: add merge style config testFelipe Contreras, Jun 9, 2021
  3. Eric SunshineJun 9, 2021
  4. Felipe ContrerasJun 9, 2021
  5. Phillip WoodJun 10, 2021
  6. Felipe ContrerasJun 10, 2021
  7. Phillip WoodJun 10, 2021
  8. Felipe ContrerasJun 10, 2021
  9. Phillip WoodJun 10, 2021
  10. Felipe ContrerasJun 10, 2021
  11. Phillip WoodJun 11, 2021
  12. Felipe ContrerasJun 11, 2021
  13. 3/7 notes: fix merge.conflictstyle handlingFelipe Contreras, Jun 9, 2021
  14. 7/7 xdiff: make diff3 the default conflictStyleFelipe Contreras, Jun 9, 2021
  15. Johannes SixtJun 10, 2021
  16. Đoàn Trần Công DanhJun 10, 2021
  17. Felipe ContrerasJun 10, 2021
  18. Felipe ContrerasJun 10, 2021
  19. Jeff KingJun 10, 2021
  20. Felipe ContrerasJun 10, 2021
  21. Jeff KingJun 10, 2021
  22. Junio C HamanoJun 11, 2021
  23. Johannes SixtJun 11, 2021
  24. Junio C HamanoJun 11, 2021
  25. Johannes SixtJun 11, 2021
  26. Junio C HamanoJun 11, 2021
  27. Sergey OrganovJun 11, 2021
  28. Felipe ContrerasJun 11, 2021
  29. Sergey OrganovJun 11, 2021
  30. Felipe ContrerasJun 11, 2021
  31. Johannes SixtJun 11, 2021
  32. Felipe ContrerasJun 11, 2021
  33. Sergey OrganovJun 11, 2021
  34. Felipe ContrerasJun 11, 2021
  35. Sergey OrganovJun 11, 2021
  36. Felipe ContrerasJun 11, 2021
  37. Felipe ContrerasJun 11, 2021
  38. Johannes SixtJun 11, 2021
  39. Felipe ContrerasJun 11, 2021
  40. Felipe ContrerasJun 11, 2021
  41. Phillip WoodJun 10, 2021
  42. Felipe ContrerasJun 10, 2021
  43. 5/7 xdiff: rename XDL_MERGE_STYLE_DIFF3Felipe Contreras, Jun 9, 2021
  44. Phillip WoodJun 10, 2021
  45. Felipe ContrerasJun 10, 2021
  46. Junio C HamanoJun 11, 2021
  47. Felipe ContrerasJun 11, 2021
  48. 6/7 xdiff: simplify style assignmentsFelipe Contreras, Jun 9, 2021
  49. Phillip WoodJun 10, 2021
  50. Felipe ContrerasJun 10, 2021
  51. 2/7 merge-tree: fix merge.conflictstyle handlingFelipe Contreras, Jun 9, 2021
  52. 4/7 checkout: fix merge.conflictstyle handlingFelipe Contreras, Jun 9, 2021
  53. Phillip WoodJun 10, 2021
  54. Felipe ContrerasJun 10, 2021
  55. Phillip WoodJun 10, 2021
  56. Felipe ContrerasJun 10, 2021
  57. Phillip WoodJun 11, 2021
  58. Felipe ContrerasJun 11, 2021
  59. Phillip WoodJun 11, 2021
  60. Phillip WoodJun 17, 2021
  61. Felipe ContrerasJun 17, 2021
  62. Felipe ContrerasJun 11, 2021
  63. Elijah NewrenJun 11, 2021
  64. Felipe ContrerasJun 11, 2021
  65. Felipe ContrerasJun 11, 2021
  66. Elijah NewrenJun 11, 2021
  67. Felipe ContrerasJun 11, 2021
  68. Elijah NewrenJun 11, 2021
  69. Felipe ContrerasJun 13, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.