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
{{ message }}
Repository navigation
rebase-helper: pan done can push a half-rebased HEAD; --ours drops .pan edits during rebase #6007
Found by a real-git test written for #5754 (rebase-helper-state.test.ts on feature/pan-5754). That test fails against main's src/lib/rebase-helper.ts.
Bug 1: pan done can push a half-rebased HEAD. When a rebase is already in progress, HEAD sits on the target. The helper takes its "already rebased" path, reports success, and pushes the mid-rebase HEAD to the feature branch.
Trigger:pan done runs while a rebase is cleanly paused (an edit or break stop, or --force). With conflicts, the clean-tree check refuses first.
Fix (already on feature/pan-5754, PR PAN-5754 #5993): check for an in-progress rebase before anything else, and refuse to continue rebase state the helper didn't start in the same call.
Bug 2: --ours during a rebase keeps the target's copy of a conflicting .pan file. During a rebase, --ours is the target branch's side, not the feature's. So a conflicting .pan file reverts to main's copy, and that commit's planning edits are silently dropped. The code comment ("local wins", "never shared in main") is wrong on both counts.
Fix: use --theirs during a rebase (the commit being replayed), or resolve .pan conflicts explicitly.
Test: a test where the feature commit's .pan edit survives a rebase conflict.
Activity