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

From: Junio C Hamano <[email-masked]>
Date: Sun, 27 Jul 2008 23:18:51 -0700

Christian Couder <[email-masked]> 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.