Git development
 help / color / mirror / Atom feed
From: "A4-Tacks via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: A4-Tacks <wdsjxhno1001@163.com>, A4-Tacks <wdsjxhno1001@163.com>
Subject: [PATCH] completion: add blob:none etc after git clone --filter=
Date: Sat, 21 Nov 2026 12:54:46 +0000	[thread overview]
Message-ID: <pull.2481.git.git.1795265686332.gitgitgadget@gmail.com> (raw)

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

                 reply	other threads:[~2026-11-21 12:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=pull.2481.git.git.1795265686332.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=wdsjxhno1001@163.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox