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

[PATCH] completion: support "git fetch --multiple"

From
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Date
Sep 20, 2018, 16:37 UTC
Message-ID
<20180920163733.20046-1-pclouds@gmail.com>

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
Message 1 of 1 in “completion: support "git fetch --multiple"”
  1. completion: support "git fetch --multiple"Nguyễn Thái Ngọc Duy, Sep 20, 2018

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.