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

[PATCH] doc: use 'ref' instead of 'commit' for merge-base arguments

From
TGTakuya N via GitGitGadget <gitgitgadget@gmail.com>
Date
Mar 3, 2020, 07:23 UTC
Message-ID
<pull.719.git.git.1583220197856.gitgitgadget@gmail.com>
From: Takuya Noguchi <takninnovationresearch@gmail.com>

The notation <commit> can be misunderstandable only for commit SHA1, but merge-base accepts any commit references. Like reflog, the name of arguments should be <ref> instead of <commit>.

Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
---
    doc: use 'ref' instead of 'commit' for merge-base arguments
    
    The notation <commit> can be misunderstandable only for commit SHA1, but 
    merge-base accepts any commit references. Like reflog, the name of
    arguments should be <ref> rather than <commit>.
    
    Signed-off-by: Takuya Noguchi takninnovationresearch@gmail.com
    [takninnovationresearch@gmail.com]
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-719%2Ftnir%2Fmerge-base-supporting-refs-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-719/tnir/merge-base-supporting-refs-v1
Pull-Request: https://github.com/git/git/pull/719
 Documentation/git-merge-base.txt | 10 +++++-----
 builtin/merge-base.c             | 12 ++++++------
 2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/Documentation/git-merge-base.txt b/Documentation/git-merge-base.txt
index 2d944e0851f..b87528ef269 100644
--- a/Documentation/git-merge-base.txt
+++ b/Documentation/git-merge-base.txt
@@ -9,11 +9,11 @@ git-merge-base - Find as good common ancestors as possible for a merge
 SYNOPSIS
 --------
 [verse]
-'git merge-base' [-a|--all] <commit> <commit>...
-'git merge-base' [-a|--all] --octopus <commit>...
-'git merge-base' --is-ancestor <commit> <commit>
-'git merge-base' --independent <commit>...
-'git merge-base' --fork-point <ref> [<commit>]
+'git merge-base' [-a|--all] <ref> <ref>...
+'git merge-base' [-a|--all] --octopus <ref>...
+'git merge-base' --is-ancestor <ref> <ref>
+'git merge-base' --independent <ref>...
+'git merge-base' --fork-point <ref> [<ref>]
 
 DESCRIPTION
 -----------
diff --git a/builtin/merge-base.c b/builtin/merge-base.c
index e3f8da13b69..910916ae0ec 100644
--- a/builtin/merge-base.c
+++ b/builtin/merge-base.c
@@ -29,11 +29,11 @@ static int show_merge_base(struct commit **rev, int rev_nr, int show_all)
 }
 
 static const char * const merge_base_usage[] = {
-	N_("git merge-base [-a | --all] <commit> <commit>..."),
-	N_("git merge-base [-a | --all] --octopus <commit>..."),
-	N_("git merge-base --independent <commit>..."),
-	N_("git merge-base --is-ancestor <commit> <commit>"),
-	N_("git merge-base --fork-point <ref> [<commit>]"),
+	N_("git merge-base [-a | --all] <ref> <ref>..."),
+	N_("git merge-base [-a | --all] --octopus <ref>..."),
+	N_("git merge-base --independent <ref>..."),
+	N_("git merge-base --is-ancestor <ref> <ref>"),
+	N_("git merge-base --fork-point <ref1> [<ref2>]"),
 	NULL
 };
 
@@ -158,7 +158,7 @@ int cmd_merge_base(int argc, const char **argv, const char *prefix)
 		OPT_CMDMODE(0, "is-ancestor", &cmdmode,
 			    N_("is the first one ancestor of the other?"), 'a'),
 		OPT_CMDMODE(0, "fork-point", &cmdmode,
-			    N_("find where <commit> forked from reflog of <ref>"), 'f'),
+			    N_("find where <ref2> forked from reflog of <ref1>"), 'f'),
 		OPT_END()
 	};
 

base-commit: 2d2118b814c11f509e1aa76cb07110f7231668dc
-- 
gitgitgadget
Next: Bryan Turner
Message 1 of 9 in “doc: use 'ref' instead of 'commit' for merge-base arguments”
  1. doc: use 'ref' instead of 'commit' for merge-base argumentsTakuya N via GitGitGadget, Mar 3, 2020
  2. Bryan TurnerMar 3, 2020
  3. Johannes SchindelinMar 3, 2020
  4. Junio C HamanoMar 3, 2020
  5. Johannes SchindelinMar 3, 2020
  6. Junio C HamanoMar 3, 2020
  7. doc: use 'rev' instead of 'commit' for merge-base argumentsTakuya N via GitGitGadget, Mar 4, 2020
  8. Junio C HamanoMar 4, 2020
  9. Junio C HamanoMar 4, 2020

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.