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

Re: [PATCH 2/4] merge-recursive: increase marker length with depth of recursion

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 15, 2018, 05:12 UTC
Message-ID
<xmqq8t2z6bem.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20181012212551.7689-3-newren@gmail.com>
Elijah Newren <newren@gmail.com> writes:
Show 8 quoted lines
> When using merge.conflictstyle=diff3 to have the "base version" be shown
> in conflicts, there is the possibility that the base version itself has
> conflicts in it.  This comes about when there are more than one merge
> base, and the merging of those merge bases produces a conflict.
> Since this process applies recursively, it is possible to have conflict
> markers nested at an arbitrary depth; to be able to differentiate the
> conflict markers from different nestings, we make them all of different
> lengths.

I know it is possible that the common ancestor part that is enclosed by the outermost makers can have arbitrary conflicts, and they can be even recursive conflicts. But I fail to see why it is a problem. Perhaps that is because I am not particularly good at resolving merge conflicts, but as long as the common part of the outermost merge is identifyable, would that really matter? What I would do while looking at common ancestor part with conflicts (not even a recursive one) is just to ignore it, so...

Not that I strongly oppose to incrementing the marker length at every level. I do not think it would hurt, but I just do not see how it would help.

Previous: Elijah NewrenNext: Elijah Newren
Message 8 of 15 in “More merge cleanups”
  1. 0/4 More merge cleanupsElijah Newren, Oct 12, 2018
  2. 3/4 merge-recursive: improve auto-merging messages with path collisionsElijah Newren, Oct 12, 2018
  3. Junio C HamanoOct 15, 2018
  4. 4/4 merge-recursive: Avoid showing conflicts with merge branch before HEADElijah Newren, Oct 12, 2018
  5. Junio C HamanoOct 15, 2018
  6. 1/4 t6036: add testcase where virtual merge base contains nested conflictsElijah Newren, Oct 12, 2018
  7. 2/4 merge-recursive: increase marker length with depth of recursionElijah Newren, Oct 12, 2018
  8. Junio C HamanoOct 15, 2018
  9. Elijah NewrenOct 15, 2018
  10. Junio C HamanoOct 16, 2018
  11. Elijah NewrenOct 16, 2018
  12. 0/2 More merge cleanupsElijah Newren, Oct 16, 2018
  13. 1/2 merge-recursive: improve auto-merging messages with path collisionsElijah Newren, Oct 16, 2018
  14. 2/2 merge-recursive: avoid showing conflicts with merge branch before HEADElijah Newren, Oct 16, 2018
  15. Junio C HamanoOct 18, 2018

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.