Files
lazygit/pkg/gui/controllers
Stefan HallerandClaude Opus 5.5 b57061ebeb Stop at branch boundaries when moving commits up or down
To add a commit at the end of a lower branch of a stack, the obvious way
is to create it at the top of the stack and move it down. Outside of a
rebase, pressing ctrl+j doesn't get it there. Once the commit is at the
bottom of the second branch, the next ctrl+j moves it past the
update-ref todo of the first branch and past that branch's last commit.

We made it work like this deliberately in #4096. Moving the commit past
the update-ref todo only would have required keeping the selection
where it is, and this was hard to do. Now that the destination of a
move is named explicitly, it is easy.

So if the commit below the selected commits is the head of branches of
the stack, ctrl+j now moves them past the update-ref todos of all these
branches at once, and keeps them selected. The branch marker moves up
to the bottom selected commit. The next ctrl+j moves them further into
the lower branch. ctrl+k does the same the other way round: if the
topmost selected commit is the head of branches, it moves the commits
past their update-ref todos first, to the start of the branch above.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 15:26:39 +01:00
..
…