Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
bmartin opened this issue Sep 22, 2021 · 5 comments
Assignees
Labels
bug Something isn't working needs-verification Request for verification
Milestone

Comments

@bmartin
Copy link

bmartin commented Sep 22, 2021

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.

@bmartin bmartin added potential-bug triage Needs to be looked at labels Sep 22, 2021
@eamodio eamodio added bug Something isn't working under-discussion Being considered or is under active discussion and removed potential-bug triage Needs to be looked at labels Dec 22, 2021
@eamodio eamodio self-assigned this Dec 22, 2021
@eamodio eamodio added this to the Soonish™ milestone Dec 22, 2021
@eamodio
Copy link
Member

eamodio commented Dec 22, 2021

Hrm, let me think about this to see how this would work. But once the rebase starts -- you'd expect that closing the editor would continue the rebase?

@eamodio eamodio removed the under-discussion Being considered or is under active discussion label Nov 6, 2022
@eamodio eamodio modified the milestones: Soon™, 13.1 Nov 6, 2022
eamodio added a commit that referenced this issue Nov 6, 2022
 - Improves performance and user experience
 - Adds always available header and footer
 - Shows commit details on selection
 - Adds full commit message
 - Adds  fixup shortcut key to UI
 - Fixes large rebases not showing commit details
@eamodio eamodio added pending-release Resolved but not yet released to the stable edition needs-verification Request for verification labels Nov 6, 2022
@eamodio
Copy link
Member

eamodio commented Nov 6, 2022

Unfortunately I've had to remove the "close to abort" functionality altogether, as recent versions of VS Code changed the event timing and I can no longer reliably get it to work. So now, closing the editor will always start the rebase -- as I can't even control the closing of the editor at all now.

@eamodio
Copy link
Member

eamodio commented Nov 6, 2022

Can you please verify this fix in tomorrow's pre-release edition of GitLens?

You can switch to the pre-release edition of GitLens, by clicking on the "Switch to Pre-Release version of this extension" from the Extensions view.

image

@bmartin
Copy link
Author

bmartin commented Nov 6, 2022 via email

@eamodio eamodio closed this as completed Nov 12, 2022
@eamodio eamodio changed the title Closing interacteractive rebase editor after "git rebase --edit" aborts rebase-in-progress Closing interactive rebase editor after "git rebase --edit" aborts rebase-in-progress Nov 17, 2022
@d13 d13 removed the pending-release Resolved but not yet released to the stable edition label Nov 22, 2022
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working needs-verification Request for verification
Projects
None yet
Development

No branches or pull requests

3 participants