mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-02-20 01:02:29 +08:00
The test demonstrates that the behavior is undesirable right now: we move the commit only past the update-ref todo of branch1, which means the order of commits stays the same and only the branch head icon moves up by one. However, we move the selection down by one, so the wrong commit is selected now. This is especially bad if you type a bunch of ctrl-j quickly in a row, because now you are moving the wrong commit. There are two possible ways to fix this: 1) keep the moving behavior the same, but don't change the selection 2) change the behavior so that we move the commit not only past the update-ref, but also past the next real commit. You could argue that 1) is the more desirable fix, as it gives you more control over where exactly the moved commit goes; however, it is much trickier to implement, so we go with 2) for now (and that's what the commented-out "EXPECTED" section documents here). If users need more fine-grained control, they can always enter an interactive rebase first.