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
This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix(package): don't pop an unrelated stash during upgrade (#394)
git stash exits 0 with "No local changes to save" when the only
local change is an untracked file, without creating a new stash
entry. upgrade() treated that exit code alone as proof a stash was
created, so the later git stash pop could restore an unrelated,
pre-existing stash and recreate already-resolved conflicts on
subsequent updates.
Compare refs/stash before and after running git stash to confirm a
new entry actually exists before popping, and pop that specific
entry (stash@{0}) instead of relying on exit code alone. A
conflicting pop is now treated as a failed upgrade with an
actionable error message instead of only logging a warning.
Fixes #393