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

Re: History over-simplification

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 25, 2007, 22:42 UTC
Message-ID
<7v4phi4b9t.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20070923044628.GA3099@spearce.org>
"Shawn O. Pearce" <spearce@spearce.org> writes:
Show 12 quoted lines
> I don't really like the patch to revision.c because it winds up
> showing trivial merges too.  What I really want is to have the
> "--full-history" option include a merge if either of the following
> is true:
>
>  a) The resulting path does not match _any_ of the parents.  We
>     already handle this case correctly in revision.c and correctly
>     show the "evil" merge.
>
>  b) The resulting path matches one of the parents but not one of
>     the others.  In such a case the merge should still be output if
>     a 3-way read-tree would not have chosen this result by default.

I am not sure (b) is useful in general. Merging two branches that fix the same issue but in different ways (think: 'maint' and 'master' have different infrastructure and a fix initially made on 'master' was backported to 'maint', and then later 'maint' needed to be merged to 'master' to carry forward other fixes) is a norm, and in such cases taking the version from the merged-to branch is almost always what happens.

Also it sounds to me by "if read-tree would not have chosen this result by default" you mean this feature would not just need to run merge-base but also recursive merge-base synthesis, and also recreate the structural merge (aka "rename detection") there as well. Even if (b) is useful, it sounds like a very expensive option, and the current merge-recursive code is structured in such a way to be easily reused for this purpose.

Previous: Shawn O. PearceNext: Shawn O. Pearce
Message 2 of 3 in “History over-simplification”
  1. Shawn O. PearceSep 23, 2007
  2. Junio C HamanoSep 25, 2007
  3. Shawn O. PearceSep 26, 2007

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.