cocogitto: [BUG] Cannot edit commit: there is an existing rebase in progress

Describe the bug When trying to edit a commit with cog edit (with or without the -l flag), I am getting an error:

$ EDITOR=nano cog edit -l 
Error: there is an existing rebase in progress; class=Rebase (29)

To Reproduce

  1. In a project with invalid commits, run cog edit.
  2. Edit the commit messages so they are valid.
  3. Once done, see an error from the last edit (sorry I lost the message shown).
  4. Currently checked out to a commit f43daa2..., so checkout back to dev/main branch git checkout dev.
  5. Try to git push but see those commits previously edited were not saved.
  6. Run cog edit again, and see the error: Error: there is an existing rebase in progress; class=Rebase (29)

Expected behavior I expect the commits to be edited successfully and not be required to manually checkout back to dev/main branch. (This didnt happen because an error was shown after editing one of the commits I believe).

Additional context n/a

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 17

Most upvoted comments

Yep I noticed that yesterday while debugging your issue. cog check see the allowed commit types while cog edit use strictly conventional commit, allowing unknown commit types.

This belongs to another issue (don’t bother I will open it). You can just git rebase -i and rename the commit type to docs until it is fixed.

Seems the rebase performed by cocogitto try to apply the head commit twice. I still don’t know why but I am close.

I will fix this shortly, meanwhile you can perform a normal git interactive rebase instead.