fix(session): remove incorrect worktree removal in ensure_session
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. Fixes #229
This commit is contained in:
@@ -386,12 +386,6 @@ ensure_session() {
|
||||
return 0
|
||||
fi
|
||||
|
||||
if $worktree_exists && ! $session_exists; then
|
||||
log "warn" "ensure_session" "Worktree exists but session is missing. Removing worktree to recreate both..."
|
||||
remove_worktree_for_issue "$issue_ref"
|
||||
worktree_exists=false
|
||||
fi
|
||||
|
||||
if ! $worktree_exists && $session_exists; then
|
||||
log "warn" "ensure_session" "Session exists but worktree is missing. Removing stale session..."
|
||||
rm -f "$session_path"
|
||||
|
||||
Reference in New Issue
Block a user