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

Re: auto merge bug

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 5, 2013, 15:44 UTC
Message-ID
<7vtxopvoky.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20130305090326.GC13552@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 6 quoted lines
> I think the merge will produce the results you are looking for. This
> would have to be configurable, though, as it is a regression for
> existing users of "union", which would want the duplicate-line
> suppression (or maybe not; it will only catch such duplicates at the
> beginning and end of the conflict hunk, so maybe it is sane to always
> ask "union" to keep all lines).

The original use-case example of "union" was to merge two shopping lists (e.g. I add "bread" and "orange juice" to remind me that we need to buy these things, while my wife adds "bread" and "butter").

We do not necessarily want to end up with a shopping list to buy two loaves of bread. When the user verifies and fixes up the result, we can keep the current behaviour and those who want to re-dup can add one back, or we can change the behaviour to leave the duplicates and those who do not want to see duplicates can remove them manually.

Given that the caveat you quoted already tells the user to verify the result and not to use it without understanding its implications, I think it technically is fine either way (read: keeping duplicates is not a clearly superiour solution). So let's leave it as-is.

Previous: Jeff KingNext: Jeff King
Message 4 of 9 in “auto merge bug”
  1. David KrmpoticMar 4, 2013
  2. Jeff KingMar 5, 2013
  3. Jeff KingMar 5, 2013
  4. Junio C HamanoMar 5, 2013
  5. Jeff KingMar 5, 2013
  6. Junio C HamanoMar 5, 2013
  7. Andreas EricssonMar 5, 2013
  8. David KrmpoticMar 5, 2013
  9. Jeff KingMar 6, 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.