Files
gstack/gstack-upgrade
Garry TanandClaude Fable 5 6ad9db51fb fix(upgrade): fast-forward first; reset --hard only behind a proved-safe gate (#2517)
/gstack-upgrade went straight to stash + reset --hard origin/main. Now it
tries git pull --ff-only --autostash first (the same policy session-update's
auto-upgrade uses). The destructive fallback runs unprompted ONLY when both
git status --porcelain AND git rev-list origin/main..HEAD are empty — a
clean tree with unpushed local commits is NOT safe, reset destroys them.
Anything else requires an explicit one-way-door confirmation that lists every
dirty file and unpushed commit being discarded.

Fixes #2517.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-17 10:53:36 -07:00
..