Thread (13 messages) 13 messages, 4 authors, 19d ago

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

From: Junio C Hamano <hidden>
Date: 2026-05-24 12:09:00

"Zakariyah Ali via GitGitGadget" [off-list ref] writes:
From: Zakariyah Ali <redacted>

Signed-off-by: Zakariyah Ali <redacted>
---
    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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help