mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-10-06 05:57:38 -04:00
If `f` is used on several branches that are checked out in other worktrees, the first worktree in which the fast-forward fails stops the whole operation. For example, an untracked file that the fast-forward would overwrite leaves the branches after it untouched, even though nothing is wrong with them. Try all the branches, and report the errors of the failed ones together. The checks that refuse to fast-forward any of the branches still run before anything is moved. The next commit uses forwardBranches for auto-forwarding branches in other worktrees, where stopping at the first failure is worse. A worktree that fails every time would prevent the ones after it from ever being forwarded. For this, forwardBranches also takes the git commands to use, since a background worker doesn't block switching repos. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>