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

[PATCH] completion: add blob:none etc after git clone --filter=

From
AGA4-Tacks via GitGitGadget <gitgitgadget@gmail.com>
Date
Nov 21, 2026, 12:54 UTC
Message-ID
<pull.2481.git.git.1795265686332.gitgitgadget@gmail.com>
From: A4-Tacks <wdsjxhno1001@163.com>

Git clone and fetch both have similar --filter arg, but currently cannot complete after --filter= in clone.

So add completions similar to git fetch --filter=
Signed-off-by: A4-Tacks <wdsjxhno1001@163.com>
---
    completion: add blob:none etc after git clone --filter=
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2481%2FA4-Tacks%2Fcomplete-filter-clone-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2481/A4-Tacks/complete-filter-clone-v1
Pull-Request: https://github.com/git/git/pull/2481
 contrib/completion/git-completion.bash | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 9cd9c7cadb..f8f7f40a94 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1841,6 +1841,10 @@ _git_clone ()
 			--cur="${cur##--config=}"
 		return
 		;;
+	--filter=*)
+		__gitcomp "blob:none blob:limit= sparse:oid=" "" "${cur##--filter=}"
+		return
+		;;
 	--*)
 		__gitcomp_builtin clone
 		return

base-commit: 0ffa3e35c7c82ab8d0de226149fb03b3f7674d05
-- 
gitgitgadget
Message 1 of 1 in “completion: add blob:none etc after git clone --filter=”
  1. completion: add blob:none etc after git clone --filter=A4-Tacks via GitGitGadget, Nov 21, 2026

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.