git-merge-base/git-show-branch --merge-base: Documentation and test
Currently, the documentation suggests that 'git merge-base -a' and 'git show-branch --merge-base' are equivalent (in fact it claims that the former cannot handle more than two revs). Alas, the handling of more than two revs is very different. Document this by tests and correct the documentation to reflect this. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
995bdc73fe
commit
f621a8454d
@ -27,6 +27,10 @@ commits on the command line. As the most common special case, specifying only
|
||||
two commits on the command line means computing the merge base between
|
||||
the given two commits.
|
||||
|
||||
As a consequence, the 'merge base' is not necessarily contained in each of the
|
||||
commit arguments if more than two commits are specified. This is different
|
||||
from linkgit:git-show-branch[1] when used with the `--merge-base` option.
|
||||
|
||||
OPTIONS
|
||||
-------
|
||||
-a::
|
||||
|
@ -82,9 +82,11 @@ OPTIONS
|
||||
Synonym to `--more=-1`
|
||||
|
||||
--merge-base::
|
||||
Instead of showing the commit list, just act like the
|
||||
'git-merge-base -a' command, except that it can accept
|
||||
more than two heads.
|
||||
Instead of showing the commit list, determine possible
|
||||
merge bases for the specified commits. All merge bases
|
||||
will be contained in all specified commits. This is
|
||||
different from how linkgit:git-merge-base[1] handles
|
||||
the case of three or more commits.
|
||||
|
||||
--independent::
|
||||
Among the <reference>s given, display only the ones that
|
||||
|
Reference in New Issue
Block a user