When repoBase() fails in RemoveWithOptions, the function previously returned early after removing the directory but without calling WorktreePrune(). This could leave stale worktree entries in .git/worktrees/ if the polecat was created before the repo base became unavailable. Now we attempt to prune from both possible repo locations (bare repo and mayor/rig) before the early return. This is a best-effort cleanup that handles edge cases where the repo base is corrupted but worktree entries still exist. Resolves: gt-wisp-618ar Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
39 KiB
39 KiB