Skip to content

Closing interactive rebase editor after "git rebase --edit" aborts rebase-in-progress #1652

@bmartin

Description

@bmartin

If I'm starting a new rebase, the behavior that closing the editor (CTRL+w) aborts the rebase is natural and reasonable. Basically you need to use CTRL+ENTER to start the rebase. However, if I'm in the middle of a rebase, this behavior is really bad, to the point where I've now disabled the editor.

  • GitLens Version: v11.6.0

Steps to Reproduce:

  1. Start interactive rebase and use Edit on some commit down the list, then hit CTRL+ENTER to start
  2. In the terminal, enter "git rebase --edit" and edit the rebase. (I used "r e" in edamagit)
  3. Decide you don't want to edit, so close window with CTRL+w
  4. Notice that you are no longer in a rebase and all future commits are lost
  5. Break out "git revlog HEAD" and swear a lot to recover the lost commits

The workflow of just closing the editor if nothing is wrong works for amending a commit, so it is really natural to do for the rebase editor. Emptying out the git-rebase-todo file is surprising in this case.

I'm not entirely sure if there is a way to differentiate between in-progress and proposed rebase sessions, so I'm not sure how hard this is to fix.

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions