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

[PATCH] completion: git branch --set-upstream-to=

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Sep 11, 2012, 11:58 UTC
Message-ID
<bd9d638e84e7e142e94b71213bed2126ea1f1951.1347364675.git.git@drmicha.warpmail.net>

Remove the deprecated --set-upstream from completion suggestions and add the new --set-upstream-to=, offering all refs for completion like in similar cases.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
---
 contrib/completion/git-completion.bash | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 222b804..625d767 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -875,11 +875,14 @@ _git_branch ()
 	done
 
 	case "$cur" in
+	--set-upstream-to=*)
+		__gitcomp "$(__git_refs)" "" "${cur##--set-upstream-to=}"
+		;;
 	--*)
 		__gitcomp "
 			--color --no-color --verbose --abbrev= --no-abbrev
 			--track --no-track --contains --merged --no-merged
-			--set-upstream --edit-description --list
+			--set-upstream-to= --edit-description --list
 			"
 		;;
 	*)
-- 
1.7.12.443.g84e0989
Next: Junio C Hamano
Message 1 of 4 in “completion: git branch --set-upstream-to=”
  1. completion: git branch --set-upstream-to=Michael J Gruber, Sep 11, 2012
  2. Junio C HamanoSep 11, 2012
  3. Junio C HamanoSep 11, 2012
  4. Michael J GruberSep 12, 2012

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.