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

Re: [PATCH] completion: hide dotfiles for selected path completion

From
Junio C Hamano <gitster@pobox.com>
Date
May 24, 2026, 12:08 UTC
Message-ID
<xmqq8q99huw5.fsf@gitster.g>
In-Reply-To
<pull.2311.git.git.1779590184752.gitgitgadget@gmail.com>
"Zakariyah Ali via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 10 quoted lines
> From: Zakariyah Ali <zakariyahali100@gmail.com>
>
> Signed-off-by: Zakariyah Ali <zakariyahali100@gmail.com>
> ---
>     completion: hide dotfiles for selected path completion
>     
>     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 ..
Writing 'path with ".".' would have been easieer to grok.
>     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.

I am not sure why this is a good idea. If we said "git rm g<TAB> and offered ".gitignore" as a candidate, it may be annoying, but tracked (or untracked for that matter) ".gitignore" and "gitfoo" should be treated the same way by "git rm <TAB>" no?

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

In any case, all of the above should be in the proposed log message, not below the three-dash line.

Previous: Zakariyah Ali via GitGitGadgetNext: Zakariyah Ali via GitGitGadget
Message 2 of 14 in “completion: hide dotfiles for selected path completion”
  1. completion: hide dotfiles for selected path completionZakariyah Ali via GitGitGadget, May 24, 2026
  2. Junio C HamanoMay 24, 2026
  3. completion: hide dotfiles for selected path completionZakariyah Ali via GitGitGadget, May 26, 2026
  4. Junio C HamanoMay 27, 2026
  5. Follow-up and appreciation regarding Git contributionsZakariyah Ali, Jun 3, 2026
  6. Junio C HamanoJun 10, 2026
  7. 0/2 completion: hide dotfiles for selected path completionZakariyah Ali via GitGitGadget, Jun 20, 2026
  8. 1/2 completion: hide dotfiles for selected path completionZakariyah Ali via GitGitGadget, Jun 20, 2026
  9. 2/2 completion: hide dotfiles by default for path completionZakariyah Ali via GitGitGadget, Jun 20, 2026
  10. Junio C HamanoJun 21, 2026
  11. D. Ben KnobleJun 21, 2026
  12. Junio C HamanoJun 21, 2026
  13. Junio C HamanoJun 29, 2026
  14. Junio C HamanoJul 23, 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.