You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The phantom delete command is not successfully deleting git branches as intended. The command reports success but leaves the associated git branch in the repository.
Root Cause
The issue occurs because of a mismatch between the branch naming convention:
In src/core/worktree/delete.ts:117-118, the code attempts to delete a branch named phantom/worktrees/${name}
However, the actual branch names created by phantom don't follow this pattern
Additionally, the deleteBranch function at line 72-83 silently ignores git errors, returning false on failure without reporting the issue to the user.
Current Behavior
User runs phantom delete <name>
The worktree is successfully removed
Branch deletion is attempted but fails silently
User sees "Deleted worktree 'name' and its branch" message even though the branch wasn't deleted
The git branch remains in the repository
Expected Behavior
The correct branch should be identified and deleted
If branch deletion fails, the user should be notified
The success message should accurately reflect what was deleted
Description
The
phantom deletecommand is not successfully deleting git branches as intended. The command reports success but leaves the associated git branch in the repository.Root Cause
The issue occurs because of a mismatch between the branch naming convention:
src/core/worktree/delete.ts:117-118, the code attempts to delete a branch namedphantom/worktrees/${name}Additionally, the
deleteBranchfunction at line 72-83 silently ignores git errors, returningfalseon failure without reporting the issue to the user.Current Behavior
phantom delete <name>Expected Behavior
Related Issues
--branchflag for explicit branch deletion controlSuggested Fix
--branchflag from issue feat: Add option to delete branch along with phantom in delete command #52 as a workaround