From 995bdc73fe0e28d622af0897440f0ea298345585 Mon Sep 17 00:00:00 2001 From: Michael J Gruber Date: Wed, 5 Aug 2009 09:59:19 +0200 Subject: git-merge-base/git-show-branch: Cleanup documentation and usage Make sure that usage strings and documentation coincide with each other and with the actual code. Signed-off-by: Michael J Gruber Signed-off-by: Junio C Hamano --- Documentation/git-merge-base.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Documentation/git-merge-base.txt') diff --git a/Documentation/git-merge-base.txt b/Documentation/git-merge-base.txt index 767486c770..00e400353c 100644 --- a/Documentation/git-merge-base.txt +++ b/Documentation/git-merge-base.txt @@ -8,12 +8,12 @@ git-merge-base - Find as good common ancestors as possible for a merge SYNOPSIS -------- -'git merge-base' [--all] ... +'git merge-base' [-a|--all] ... DESCRIPTION ----------- -'git-merge-base' finds best common ancestor(s) between two commits to use +'git merge-base' finds best common ancestor(s) between two commits to use in a three-way merge. One common ancestor is 'better' than another common ancestor if the latter is an ancestor of the former. A common ancestor that does not have any better common ancestor is a 'best common @@ -29,6 +29,7 @@ the given two commits. OPTIONS ------- +-a:: --all:: Output all merge bases for the commits, instead of just one. -- cgit v1.2.3 From f621a8454d19d17fe46e6951b7e3d22bebd92aba Mon Sep 17 00:00:00 2001 From: Michael J Gruber Date: Wed, 5 Aug 2009 09:59:20 +0200 Subject: 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 Signed-off-by: Junio C Hamano --- Documentation/git-merge-base.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Documentation/git-merge-base.txt') diff --git a/Documentation/git-merge-base.txt b/Documentation/git-merge-base.txt index 00e400353c..ce5b369985 100644 --- a/Documentation/git-merge-base.txt +++ b/Documentation/git-merge-base.txt @@ -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:: -- cgit v1.2.3