Skip to content

"Todo not found in git-rebase-todo" error when we try to drop merge commit #3164

@waffleboot

Description

@waffleboot

Describe the bug

I tried to drop merge commit. And I see error message:

Todo 0b698733598bb407c83e116eacd7abb24ac1cbff not found in git-rebase-todo.
error: There was a problem with the editor /opt/homebrew/bin/lazygit

To Reproduce
Steps to reproduce the behavior:

  1. Take any git repo.
  2. Make some commits in main and feature branches.
  3. Make merge main branch into feature branch.
  4. Try to delete merge commit.
  5. See error

Expected behavior

Commit should be dropped.

Version info:
Run lazygit --version and paste the result here

commit=, build date=, build source=homebrew, version=0.40.2, os=darwin, arch=arm64, git version=2.43.0

Run git --version and paste the result here

git version 2.43.0

Additional context

The reason is EditRebaseTodo tries to find pick command instead of merge.

This is git-rebase-todo:

reset 05c3ae7 # message 1
pick c232d36 message 2
merge -C 84da9cb onto # Merge branch 'master' into feature

The latest command is merge while we try to find pick command to drop it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions