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

[PATCH] clone: don't say <branch> when we mean <remote>

From
Carlos Martín Nieto <cmn@elego.de>
Date
Dec 21, 2011, 18:14 UTC
Message-ID
<1324491249-5357-1-git-send-email-cmn@elego.de>
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
---

The manpage says <name> which might actually be a better word to use everywhere, but having <branch> instead of <remote> can only lead to confusion.

Looking through blame, the second line survived a typo fix and was introduced in 2008 when clone was made a builtin. The script used to say <name>. So it's clearly nothing urgent, but it bugged me, so I'm sending a patch.

 builtin/clone.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/builtin/clone.c b/builtin/clone.c
index efe8b6c..e85ee69 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -84,8 +84,8 @@ static struct option builtin_clone_options[] = {
 		   "directory from which templates will be used"),
 	OPT_CALLBACK(0 , "reference", &option_reference, "repo",
 		     "reference repository", &opt_parse_reference),
-	OPT_STRING('o', "origin", &option_origin, "branch",
-		   "use <branch> instead of 'origin' to track upstream"),
+	OPT_STRING('o', "origin", &option_origin, "remote",
+		   "use <remote> instead of 'origin' to track upstream"),
 	OPT_STRING('b', "branch", &option_branch, "branch",
 		   "checkout <branch> instead of the remote's HEAD"),
 	OPT_STRING('u', "upload-pack", &option_upload_pack, "path",
-- 
1.7.8.352.g876a6f
Next: Junio C Hamano
Message 1 of 2 in “clone: don't say <branch> when we mean <remote>”
  1. clone: don't say <branch> when we mean <remote>Carlos Martín Nieto, Dec 21, 2011
  2. Junio C HamanoDec 21, 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.