Restructure documentation for git-merge-base.
Restructure the text of git-merge-base to better explain more clearly the different modes of operation. Signed-off-by: Vincent van Ravesteijn <vfr@lyx.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jonathan Nieder committed
Apr 15, 2011 at 10:38 UTC
ded7e0491b78e3e8384bcd9f63918c52785c4cd6
1 file changed
+16
-12
Documentation/git-merge-base.txt
+16
-12
@@ -23,23 +23,21 @@ that does not have any better common ancestor is a 'best common
23
ancestor', i.e. a 'merge base'. Note that there can be more than one
24
merge base for a pair of commits.
25
26
-Unless `--octopus` is given, among the two commits to compute the merge
27
-base from, one is specified by the first commit argument on the command
28
-line; the other commit is a (possibly hypothetical) commit that is a merge
29
-across all the remaining commits on the command line. As the most common
30
-special case, specifying only two commits on the command line means
31
-computing the merge base between the given two commits.
26
+OPERATION MODE
27
+--------------
28
+
29
+As the most common special case, specifying only two commits on the
30
+command line means computing the merge base between the given two commits.
31
+
32
+More generally, among the two commits to compute the merge base from,
33
+one is specified by the first commit argument on the command line;
34
+the other commit is a (possibly hypothetical) commit that is a merge
35
+across all the remaining commits on the command line.
36
37
As a consequence, the 'merge base' is not necessarily contained in each of the
38
commit arguments if more than two commits are specified. This is different
39
from linkgit:git-show-branch[1] when used with the `--merge-base` option.
40
37
-OPTIONS
38
--------
39
--a::
40
---all::
41
- Output all merge bases for the commits, instead of just one.
42
-
41
--octopus::
42
Compute the best common ancestors of all supplied commits,
43
in preparation for an n-way merge. This mimics the behavior
@@ -52,6 +50,12 @@ OPTIONS
50
from any other. This mimics the behavior of 'git show-branch
51
--independent'.
52
53
+OPTIONS
54
+-------
55
+-a::
56
+--all::
57
+ Output all merge bases for the commits, instead of just one.
58
+
59
DISCUSSION
60
----------
61