Repository navigation
modify fails after sync --prune: "unknown revision" for pruned merged branches #564
gavinsan33
started this conversation in
Feedback
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Version:
gh stackv0.2.1Summary
gh stack modifyfails to open aftergh stack sync --prunehas pruned merged branches. It aborts while resolving branch SHAs for branches that--pruneitself deleted, instead of skipping them the wayviewandrebasedo.Steps to reproduce
main <- merged-a <- merged-b <- active-c <- active-d).gh stack sync --prune. The merged branches' local refs are deleted, but their entries remain in the stack metadata (.git/gh-stack) — this is the documented behavior ("Stack metadata is preserved so that rebase and display logic continue to work correctly").gh stack modify.Actual
modifyresolves every branch entry (including pruned-merged ones) by name via git, and dies on the first one whose ref no longer exists.Expected
modifyshould tolerate pruned merged branches — skip them the same wayviewandrebasealready do (e.g.✓ Skipping merged-a (PR #NNN merged)), and open the TUI over the remaining branches.Notes
gh stack viewandgh stack rebasework fine in this state; onlymodifychokes.sync --pruneproduces a stack state thatmodifycannot read..git/gh-stack.All reactions