Git development
 help / color / mirror / Atom feed
* [PATCH] completion: add blob:none etc after git clone --filter=
@ 2026-11-21 12:54 A4-Tacks via GitGitGadget
  0 siblings, 0 replies; only message in thread
From: A4-Tacks via GitGitGadget @ 2026-11-21 12:54 UTC (permalink / raw)
  To: git; +Cc: A4-Tacks, A4-Tacks

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

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

only message in thread, other threads:[~2026-11-21 12:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-21 12:54 [PATCH] completion: add blob:none etc after git clone --filter= A4-Tacks via GitGitGadget

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox