Thread (7 messages) 7 messages, 4 authors, 2025-10-01

Re: What is the reason behind not hiding git worktrees from git?

From: Michal Suchánek <hidden>
Date: 2025-09-30 10:37:12

On Sat, Sep 27, 2025 at 09:08:44PM +0000, Jason Cho wrote:
quoted
It does not not show its own .git directory as untracked files

That can be seen as inconsistent.
Well, I see your point. Since the .git directory is from a git repo, the directory is ignored by git. Therefore, you want git to also ignore other items derived from the repo, including work trees.

However, this is a minor improvement and I suspect your proposed feature may have an unknown impact.
The impact is that the list of worktrees would have to be read to get
status. As status is not particularly cheap operation in any case I
would expect the problem to be minor.
Anyway, what's your real use case? Do you really add hundreds of work trees within the same repo directory so that you hate to see them in git status?
What is the abstraction you are trying to propose here?

Or do you suggest to eschew any intelligible abstraction in favor of
(probably minor) implementation convenience?

Thanks

Michal
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help