pub async fn remove_worktree_from_linked(dir: &Path)Expand description
Unregister a linked worktree whose directory is about to be deleted by
hand, so the path can be worktree add-ed again.
A linked worktree’s .git is a file whose gitdir: line names the
bookkeeping entry inside its repository’s admin directory; pruning from
there removes the registration without touching the directory. No-op when
dir is not a registered worktree (.git missing or not a gitdir:
link): nothing was registered, nothing survives removal.