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

Re: Distinguishing trivial and non-trivial merge commits

From
Junio C Hamano <gitster@pobox.com>
Date
May 2, 2010, 23:07 UTC
Message-ID
<7vwrvlucls.fsf@alter.siamese.dyndns.org>
In-Reply-To
<19421.59529.849850.968565@winooski.ccs.neu.edu>
Eli Barzilay <eli@barzilay.org> writes:
Show 5 quoted lines
> Good -- the first paragraph is what I thought it would do, the second
> makes it even better.  Perhaps it would be nice to show such manual
> reoslutions from one parent, but I think that that certainly qualifies
> as stuff that is much less interesting than work that was done to
> combine content inside a file, or one of those evil merges.
You need to be careful here.

If you see a conflicted hunk and the result ends up being the same from one of the parents in that area, then the _result_ is trivial as far as the merge (and hence --cc) is concerned, even though you may have spent considerable braincycle to stare at the conflict to decide that taking a change from one side is the right thing to do.

You keep saying "manual resolutions", but --cc doesn't have much to do with the resolution being manual, nor if the initial mechanical merge attempt left conflict markers. You would need to redo the merge to find that out, and it can be fairly cheaply done with a temporary index and an empty temporary working tree elsewhere in the filesystem.

Previous: Eli BarzilayNext: Eli Barzilay
Message 6 of 8 in “Distinguishing trivial and non-trivial merge commits”
  1. Eli BarzilayApr 30, 2010
  2. Jonathan NiederMay 2, 2010
  3. Eli BarzilayMay 2, 2010
  4. Jakub NarebskiMay 2, 2010
  5. Eli BarzilayMay 2, 2010
  6. Junio C HamanoMay 2, 2010
  7. Eli BarzilayMay 2, 2010
  8. Jonathan NiederMay 2, 2010

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.