fix(session): remove incorrect worktree removal in ensure_session #231
Reference in New Issue
Block a user
Delete Branch "fix/issue-229-ensure-session-worktree-bug"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When worktree exists but session is missing, ensure_session was incorrectly removing the worktree before recreating. This caused issues when cmd_continue called ensure_worktree first (creating the worktree) then ensure_session (which wrongly removed it).
The fix removes the block that removes worktree when session is missing. If worktree exists, just create the session without touching the worktree.
lgtm