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
- In a project with invalid commits, run
cog edit. - Edit the commit messages so they are valid.
- Once done, see an error from the last edit (sorry I lost the message shown).
- Currently checked out to a commit
f43daa2..., so checkout back to dev/main branchgit checkout dev. - Try to
git pushbut see those commits previously edited were not saved. - Run
cog editagain, 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
Yep I noticed that yesterday while debugging your issue.
cog checksee the allowed commit types whilecog edituse strictly conventional commit, allowing unknown commit types.This belongs to another issue (don’t bother I will open it). You can just
git rebase -iand rename the commit type todocsuntil 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.