1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-11-25 22:32:13 +02:00

Make EditRebaseTodo more robust

It used to work on the assumption that rebasing commits in lazygit's model
correspond one-to-one to lines in the git-rebase-todo file, which isn't
necessarily true (e.g. when users use "git rebase --edit-todo" at the custom
command prompt and add a "break" between lines).
This commit is contained in:
Stefan Haller
2023-04-02 19:16:28 +02:00
parent 860a8d102b
commit 120dd1530a
4 changed files with 51 additions and 19 deletions

View File

@@ -354,9 +354,7 @@ func (self *LocalCommitsController) handleMidRebaseCommand(action todo.TodoComma
false,
)
if err := self.git.Rebase.EditRebaseTodo(
self.context().GetSelectedLineIdx(), action,
); err != nil {
if err := self.git.Rebase.EditRebaseTodo(commit, action); err != nil {
return false, self.c.Error(err)
}