Git development
 help / color / mirror / Atom feed
From: "Zakariyah Ali via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Zakariyah Ali <zakariyahali100@gmail.com>,
	Zakariyah Ali <zakariyahali100@gmail.com>
Subject: [PATCH v3 0/2] completion: hide dotfiles for selected path completion
Date: Sat, 20 Jun 2026 17:55:54 +0000	[thread overview]
Message-ID: <pull.2311.v3.git.git.1781978156.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.2311.v2.git.git.1779808987825.gitgitgadget@gmail.com>

The completion helper for index paths uses git ls-files rather than shell
filename completion. As a result, leading-dot paths such as a tracked
.gitignore were offered even when the user had not started the path with ..

Hide leading-dot path components for git rm, git mv, and git ls-files when
completing an empty path component. Explicit dot completion is still
preserved, so git rm . can still complete .gitignore.

This removes the existing TODO expectations in t/t9902-completion.sh and
adds coverage for explicit dot completion.

Validation:

 * git diff --check -- contrib/completion/git-completion.bash
   t/t9902-completion.sh
 * bash -n contrib/completion/git-completion.bash
 * ./t9902-completion.sh

Zakariyah Ali (2):
  completion: hide dotfiles for selected path completion
  completion: hide dotfiles by default for path completion

 contrib/completion/git-completion.bash | 53 +++++++++++++++-----------
 t/t9902-completion.sh                  | 19 ++++-----
 2 files changed, 40 insertions(+), 32 deletions(-)


base-commit: 9b7fa37559a1b95ee32e32858b0d038b4cf583e5
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2311%2Falibaba0010%2Fcompletion-hide-dotfiles-v3
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2311/alibaba0010/completion-hide-dotfiles-v3
Pull-Request: https://github.com/git/git/pull/2311

Range-diff vs v2:

 1:  056e239e06 = 1:  056e239e06 completion: hide dotfiles for selected path completion
 -:  ---------- > 2:  7482ee4645 completion: hide dotfiles by default for path completion

-- 
gitgitgadget

  parent reply	other threads:[~2026-06-20 17:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-24  2:36 [PATCH] completion: hide dotfiles for selected path completion Zakariyah Ali via GitGitGadget
2026-05-24 12:08 ` Junio C Hamano
2026-05-26 15:23 ` [PATCH v2] " Zakariyah Ali via GitGitGadget
2026-05-27  3:22   ` Junio C Hamano
2026-06-03 18:09   ` Follow-up and appreciation regarding Git contributions Zakariyah Ali
2026-06-10 18:56   ` [PATCH v2] completion: hide dotfiles for selected path completion Junio C Hamano
2026-06-20 17:55   ` Zakariyah Ali via GitGitGadget [this message]
2026-06-20 17:55     ` [PATCH v3 1/2] " Zakariyah Ali via GitGitGadget
2026-06-20 17:55     ` [PATCH v3 2/2] completion: hide dotfiles by default for " Zakariyah Ali via GitGitGadget
2026-06-21  1:17     ` [PATCH v3 0/2] completion: hide dotfiles for selected " Junio C Hamano

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.2311.v3.git.git.1781978156.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=zakariyahali100@gmail.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