mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-10-06 14:06:32 -04:00
The worktree loader associates a worktree that is mid-rebase or mid-bisect with the branch involved, even though its HEAD is detached. Fast-forwarding such a branch therefore ran the fast-forward in that worktree. This moved the detached HEAD and put the upstream commits into the rebase in progress, while the branch stayed where it was. Remember in the worktree model when its branch comes from a rebase or bisect, and refuse to fast-forward the branch in that case. Updating only the ref is no option for a rebase; the rebase writes the branch when it finishes. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>