Under the hood
New internal check vets a repository's worktree registrations with git before removal proceeds
What
A new internal function checks whether a repository's worktree registrations can be safely verified with git before an operation (such as removing a worktree) proceeds. It resolves pointer or symlinked .git directories, and distinguishes between two outcomes: 'unlisted' (the worktree is gone or not a real repository) and 'kept' (git couldn't be asked yet, so the entry is preserved).
Why
This reduces the risk of incorrectly discarding worktree registrations when git can't yet be consulted, by keeping them by default until they can be properly checked.