git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 2/2] Restructure documentation for git-merge-base.

From
Vincent van Ravesteijn <vfr@lyx.org>
Date
Apr 15, 2011, 08:38 UTC
Message-ID
<4DA8041F.3090502@lyx.org>
In-Reply-To
<4DA47A4D.80909@lyx.org>
From: Jonathan Nieder <jrnieder@gmail.com>

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>
---
 Documentation/git-merge-base.txt |   28 ++++++++++++++++------------
 1 files changed, 16 insertions(+), 12 deletions(-)
diff --git a/Documentation/git-merge-base.txt b/Documentation/git-merge-base.txt
index a9f677b..ca5ed31 100644
--- a/Documentation/git-merge-base.txt
+++ b/Documentation/git-merge-base.txt
@@ -23,23 +23,21 @@ that does not have any better common ancestor is a 'best common
 ancestor', i.e. a 'merge base'.  Note that there can be more than one
 merge base for a pair of commits.

-Unless `--octopus` is given, among the two commits to compute the merge
-base from, one is specified by the first commit argument on the command
-line; the other commit is a (possibly hypothetical) commit that is a merge
-across all the remaining 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.
+OPERATION MODE
+--------------
+
+As the most common special case, specifying only two commits on the
+command line means computing the merge base between the given two commits.
+
+More generally, among the two commits to compute the merge base from,
+one is specified by the first commit argument on the command line;
+the other commit is a (possibly hypothetical) commit that is a merge
+across all the remaining commits on the command line.

 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::
---all::
-	Output all merge bases for the commits, instead of just one.
-
 --octopus::
 	Compute the best common ancestors of all supplied commits,
 	in preparation for an n-way merge.  This mimics the behavior
@@ -52,6 +50,12 @@ OPTIONS
 	from any other.  This mimics the behavior of 'git show-branch
 	--independent'.

+OPTIONS
+-------
+-a::
+--all::
+	Output all merge bases for the commits, instead of just one.
+
 DISCUSSION
 ----------
-- 
1.7.3.1.msysgit.0
Previous: Vincent van Ravesteijn
Message 7 of 7 in “Documentation: update to git-merge-base --octopus”
  1. Documentation: update to git-merge-base --octopusVincent van Ravesteijn, Apr 12, 2011
  2. Junio C HamanoApr 12, 2011
  3. Jonathan NiederApr 12, 2011
  4. Vincent van RavesteijnApr 15, 2011
  5. Junio C HamanoApr 15, 2011
  6. 1/2 Documentation: update to git-merge-base --octopusVincent van Ravesteijn, Apr 15, 2011
  7. 2/2 Restructure documentation for git-merge-base.Vincent van Ravesteijn, Apr 15, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.