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

Re: feature suggestion: optimize common parts for checkout --conflict=diff3

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 6, 2013, 21:32 UTC
Message-ID
<7vmwugp637.fsf@alter.siamese.dyndns.org>
In-Reply-To
<7vr4jsp756.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 23 quoted lines
> Jeff King <peff@peff.net> writes:
>
>> But it would apply to the content that is outside
>> of the hunk marker; we have changed the concept of what is in the base
>> and what is in the conflict by shrinking the conflict to its smallest
>> size.
>
> Hmm, unless you mean by "base" something entirely different from
> "what was in the common ancestor version", I do not think I can
> agree.  The point of diff3 mode is to show how it looked line in the
> common ancestor and what the conflicting sides want to change that
> common version into; letting the user view three versions to help
> him decide what to do by only looking at the part inside conflict
> markers.
>
> We show "both sides added, either identically or differently" as
> noteworthy events, but the patched code pushes "both sides added
> identically" case outside the conflicting hunk, as if what was added
> relative to the common ancestor version (in Uwe's case, is it 1-14
> that is common, or just 10-14?) is not worth looking at when
> considering what the right resolution is.  If it is not worth
> looking at what was in the original for the conflicting part, why
> would we be even using diff3 mode in the first place?

I vaguely recall we did this "clip to eager" as an explicit bugfix at 83133740d9c8 (xmerge.c: "diff3 -m" style clips merge reduction level to EAGER or less, 2008-08-29). The list archive around that time may give us more contexts.

Previous: Uwe Kleine-KönigNext: Jeff King
Message 14 of 24 in “feature suggestion: optimize common parts for checkout --conflict=diff3”
  1. Uwe Kleine-KönigMar 6, 2013
  2. Antoine PelisseMar 6, 2013
  3. Antoine PelisseMar 6, 2013
  4. Jeff KingMar 6, 2013
  5. xdiff: implement a zealous diff3Uwe Kleine-König, Mar 6, 2013
  6. Jeff KingMar 6, 2013
  7. Junio C HamanoMar 6, 2013
  8. Jeff KingMar 6, 2013
  9. Junio C HamanoMar 6, 2013
  10. Jeff KingMar 6, 2013
  11. Junio C HamanoMar 6, 2013
  12. Jeff KingMar 7, 2013
  13. Uwe Kleine-KönigMar 6, 2013
  14. Junio C HamanoMar 6, 2013
  15. Jeff KingMar 7, 2013
  16. Junio C HamanoMar 7, 2013
  17. Jeff KingMar 7, 2013
  18. Junio C HamanoMar 7, 2013
  19. Jeff KingMar 7, 2013
  20. Jeff KingApr 4, 2013
  21. Uwe Kleine-KönigApr 4, 2013
  22. Jeff KingApr 4, 2013
  23. Junio C HamanoApr 4, 2013
  24. Junio C HamanoMar 7, 2013

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.