Skip to content

Commit ded7e04

Browse files
jrngitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5729482 commit ded7e04

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

Documentation/git-merge-base.txt

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,21 @@ that does not have any better common ancestor is a 'best common
2323
ancestor', i.e. a 'merge base'. Note that there can be more than one
2424
merge base for a pair of commits.
2525

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.
3236

3337
As a consequence, the 'merge base' is not necessarily contained in each of the
3438
commit arguments if more than two commits are specified. This is different
3539
from linkgit:git-show-branch[1] when used with the `--merge-base` option.
3640

37-
OPTIONS
38-
-------
39-
-a::
40-
--all::
41-
Output all merge bases for the commits, instead of just one.
42-
4341
--octopus::
4442
Compute the best common ancestors of all supplied commits,
4543
in preparation for an n-way merge. This mimics the behavior
@@ -52,6 +50,12 @@ OPTIONS
5250
from any other. This mimics the behavior of 'git show-branch
5351
--independent'.
5452

53+
OPTIONS
54+
-------
55+
-a::
56+
--all::
57+
Output all merge bases for the commits, instead of just one.
58+
5559
DISCUSSION
5660
----------
5761

0 commit comments

Comments
 (0)