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

Re: [RFC/PATCH v2] merge-base: teach "git merge-base" to accept more than 2 arguments

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 28, 2008, 06:18 UTC
Message-ID
<7vej5ev8dw.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<200807280810.20922.chriscool@tuxfamily.org>
Christian Couder <chriscool@tuxfamily.org> writes:
> Yeah, but what is quite confusing I think is that a merge base seems to be 
> defined as "an as good as possible _common_ ancestor" but in this case, the 
> result of "git merge-base A B C" is not an ancestor of C (even with --all 
> option). So perhaps we need a better definition.

See my other message. "git merge-base A B C" is not the best common ancestors across A B and C. It is the best common ancestors between A and a commit that is a merge between B and C.

By defining/explaining it that way, you can avoid the "Huh, are you talking about OR or AND" question you would inevitably get when you say "Common ancestor of A and B or A and C". Also in "git merge-base A B C", A is fundamentally different from any other commit; a commit being (or not being) common between A and B (or A and C) is what we care about a lot, but a commit being (or not being) common between B and C does not matter in this computation.

Previous: Christian CouderNext: Johannes Schindelin
Message 4 of 11 in “merge-base: teach "git merge-base" to accept more than 2 arguments”
  1. merge-base: teach "git merge-base" to accept more than 2 argumentsChristian Couder, Jul 27, 2008
  2. Junio C HamanoJul 27, 2008
  3. Christian CouderJul 28, 2008
  4. Junio C HamanoJul 28, 2008
  5. Johannes SchindelinJul 27, 2008
  6. Miklos VajnaJul 27, 2008
  7. Junio C HamanoJul 27, 2008
  8. Johannes SchindelinJul 27, 2008
  9. Re* [RFC/PATCH v2] merge-base: teach "git merge-base" to accept more than 2 argumentsJunio C Hamano, Jul 27, 2008
  10. Christian CouderJul 28, 2008
  11. Jakub NarebskiJul 27, 2008

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.