Skip to content

Cleanup --all should use canonical path from git #79

@wollax

Description

@wollax

Problem

handle_worktree_cleanup_all computes worktree path as worktree_dir.join(&entry.spec_slug), then falls back to entry.path if the computed path doesn't exist. This heuristic can silently use a stale entry.path from git worktree list that may differ from what the user expects based on --worktree-dir.

Solution

Solution

Always use entry.path (the canonical path from git) for cleanup operations, since git worktree list already returns the actual path.


Created via Kata PR review backlog

Metadata

Metadata

Assignees

No one assigned

    Labels

    backlogKata backlog issues

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions