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

Re: Opinions on changing add/add conflict resolution?

From
Elijah Newren <newren@gmail.com>
Date
Mar 13, 2018, 23:14 UTC
Message-ID
<CABPp-BE=D_TgjLZkhRh6-7k3UpnDDMfZB6vE=FMdwFT+mmp_tw@mail.gmail.com>
In-Reply-To
<20180313225639.GC147135@aiede.svl.corp.google.com>
On Tue, Mar 13, 2018 at 3:56 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 11 quoted lines
> Elijah Newren wrote:
>
>> However, my question here about what to write to the working tree for
>> a rename/rename(2to1) conflict in one particular corner case still
>> remains.  Should a two-way merge be performed even if it may result in
>> nested sets of conflict markers, or is that a sufficiently bad outcome
>> for the user that it's the one case we do want to write colliding
>> files out to different temporary paths?
>
> Nested conflict markers only happen in the conflictstyle=diff3 case, I
> would think.

Currently, yes. To be clear, though, this change would make it possible even when there is no recursive merge being done and when conflictstyle=merge.

Show 6 quoted lines
> merge-recursive writes them already.  I've often wished that it would
> use a union merge strategy when building the common ancestor to avoid
> the nested conflicts that rerere doesn't understand.  But anyway,
> that's an orthogonal issue: in the rename/rename context, it should be
> fine to write nested conflict markers since that's consistent with
> what merge-recursive already does.
Cool, sounds like we're now all on the same page.

Someone in the future might hate us if they use conflictstyle=diff3, and have a recursive merge, and have a rename/rename(2to1) conflict in the virtual merge base with nested conflicts, and that resulting file is also involved in a separate rename/rename(2to1) conflict in the outer merge that has its own nested conflicts; we'd have up to four levels of nested conflicts. But for now, I'm going to write that off as a crazy thought (or dismiss it as nigh impossible to reason about regardless of what we did to help them) and just proceed ahead. :-)

Previous: Jonathan NiederNext: Junio C Hamano
Message 16 of 22 in “Opinions on changing add/add conflict resolution?”
  1. Elijah NewrenMar 12, 2018
  2. Jonathan NiederMar 12, 2018
  3. Elijah NewrenMar 12, 2018
  4. Jonathan NiederMar 12, 2018
  5. Hilco WijbengaMar 12, 2018
  6. Jonathan NiederMar 12, 2018
  7. Elijah NewrenMar 13, 2018
  8. Elijah NewrenMar 13, 2018
  9. Junio C HamanoMar 13, 2018
  10. Elijah NewrenMar 13, 2018
  11. Junio C HamanoMar 13, 2018
  12. Elijah NewrenMar 13, 2018
  13. Junio C HamanoMar 13, 2018
  14. Elijah NewrenMar 13, 2018
  15. Jonathan NiederMar 13, 2018
  16. Elijah NewrenMar 13, 2018
  17. Junio C HamanoMar 13, 2018
  18. Ævar Arnfjörð BjarmasonMar 12, 2018
  19. Fwd: Opinions on changing add/add conflict resolution?Elijah Newren, Mar 13, 2018
  20. Junio C HamanoMar 13, 2018
  21. Ævar Arnfjörð BjarmasonMar 13, 2018
  22. Elijah NewrenMar 13, 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.