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

[PATCH] branch: clarify <oldbranch> term

From
Rubén Justo <rjusto@gmail.com>
Date
Jan 6, 2024, 14:38 UTC
Message-ID
<d38e5a18-4d85-48f3-bc8b-8ca02ea683a4@gmail.com>

Since 52d59cc645 (branch: add a --copy (-c) option to go with --move (-m), 2017-06-18) <oldbranch> is used in more operations than just -m.

Let's also clarify what we do if <oldbranch> is omitted.
Signed-off-by: Rubén Justo <rjusto@gmail.com>
---
 Documentation/git-branch.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt
index 4395aa9354..233264549c 100644
--- a/Documentation/git-branch.txt
+++ b/Documentation/git-branch.txt
@@ -312,7 +312,8 @@ superproject's "origin/main", but tracks the submodule's "origin/main".
 	option is omitted, the current HEAD will be used instead.
 
 <oldbranch>::
-	The name of an existing branch to rename.
+	The name of an existing branch.  If this option is omitted,
+	the name of the current branch will be used instead.
 
 <newbranch>::
 	The new name for an existing branch. The same restrictions as for
-- 
2.42.0
Next: Junio C Hamano
Message 1 of 2 in “branch: clarify <oldbranch> term”
  1. branch: clarify <oldbranch> termRubén Justo, Jan 6, 2024
  2. Junio C HamanoJan 8, 2024

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.