gh-stack
gh-stack copied to clipboard
gh stack sync --prune for a completed stack deletes the branch but leaves stack in gh stack checkout metadata
gh stack sync --prune for a completed stack deletes the branch but leaves stack in gh stack checkout metadata.
Repro steps:
- Create a stack with 1 branch.
- Submit PR
- Complete PR
- Run gh stack sync --prune
- Branch is synced and deleted
- Run
gh stack checkout - Observe
Expected: Stack should be deleted
Actual: Stack is not deleted, and cannot be selected because the branch no longer exists.
Workaround: Create a branch with the same name as one that doesn't exist. Run gh stack untrack, delete branch.
sync --help explicitly says pruning preserves stack metadata for rebase and display. The completed-stack picker is still unusable, but deleting metadata changes that contract. Should fully completed stacks be an exception, or should checkout omit them?