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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 11, 2012, 17:46 UTC
Message-ID
<7vliggh2qk.fsf@alter.siamese.dyndns.org>
In-Reply-To
<7v627kiitq.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
> Thanks; I picked up $gmane/204633 but forgot to queue.
... so this has been reduced to:
-- >8 --
From: Michael J Gruber <git@drmicha.warpmail.net>
Date: Tue, 11 Sep 2012 13:58:30 +0200
Subject: [PATCH] completion: complete branch name for "branch --set-upstream-to="
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 contrib/completion/git-completion.bash | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 4a4d30a..e48cf80 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -875,6 +875,9 @@ _git_branch ()
 	done
 
 	case "$cur" in
+	--set-upstream-to=*)
+		__gitcomp "$(__git_refs)" "" "${cur##--set-upstream-to=}"
+		;;
 	--*)
 		__gitcomp "
 			--color --no-color --verbose --abbrev= --no-abbrev
-- 
1.7.12
Previous: Junio C HamanoNext: Michael J Gruber
Message 3 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.