git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] completion: support "git fetch --multiple"
@ 2018-09-20 16:37 Nguyễn Thái Ngọc Duy
  0 siblings, 0 replies; only message in thread
From: Nguyễn Thái Ngọc Duy @ 2018-09-20 16:37 UTC (permalink / raw)
  To: git; +Cc: Nguyễn Thái Ngọc Duy

When --multiple is given, the remaining arguments are remote names,
not one remote followed by zero or more refspec. Detect this case,
disable refspec completion, and pretend no remote is seen in order to
complete multiple of them.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
 contrib/completion/git-completion.bash | 1 +
 1 file changed, 1 insertion(+)

diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index d63d2dffd4..a66bec966b 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -943,6 +943,7 @@ __git_complete_remote_or_refspec ()
 			*) ;;
 			esac
 			;;
+		--multiple) no_complete_refspec=1; break ;;
 		-*) ;;
 		*) remote="$i"; break ;;
 		esac
-- 
2.19.0.rc0.337.ge906d732e7


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-09-20 16:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-20 16:37 [PATCH] completion: support "git fetch --multiple" Nguyễn Thái Ngọc Duy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).