Skip to contentSkip to conversation

bug: autostash is lost after aborted rebase

DISCUSSION Karen Etheridge 6 participants 6 messages Jun 15, 2016 – Jun 16, 2016 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

scenario:
- edit some tracked files; do not add them to the index
- "git config rebase.autostash true"
- "git rebase -i HEAD~3" (an autostash will be created)
- delete the entire buffer and save/exit the editor - this will abort the rebase

poof, the autostash is gone (it is not reapplied) -- it must be explicitly applied again via the SHA that was printed earlier.

(please cc me; I am not subscribed to the list.)

#1 lore raw
Quoted 10 lines · Karen Etheridge

scenario:
- edit some tracked files; do not add them to the index
- "git config rebase.autostash true"
- "git rebase -i HEAD~3" (an autostash will be created)
- delete the entire buffer and save/exit the editor - this will abort the rebase

poof, the autostash is gone (it is not reapplied) -- it must be explicitly applied again via the SHA that was printed earlier.

Yeah, I noticed this issue while rewriting git rebase in Ruby. I also noticed many other issues and inconsistencies that happen depending on what arguments you pass to git rebase.

I'm in the process of writing a much more improved and consistent git rebase in Ruby with a different interface. Sadly it's still not ready.

Quoted 1 line

(please cc me; I am not subscribed to the list.)

No need to say that, only on mailing lists that do Reply-To munging, and Git is not one of them.

Cheers.

Signature · 1 line
Felipe Contreras

A message that is not in the archive (sent off-list or not yet received): CAGK7Mr532G+OSXLf4HAbWoJxV2fOvxnVQXC4nV9ciPsU4JR5bA@mail.gmail.com

#3 lore raw
Quoted 9 lines

scenario:
- edit some tracked files; do not add them to the index
- "git config rebase.autostash true"
- "git rebase -i HEAD~3" (an autostash will be created)
- delete the entire buffer and save/exit the editor - this will abort the rebase

poof, the autostash is gone (it is not reapplied) -- it must be explicitly applied again via the SHA that was printed earlier.

Yes, I hit this often and it's annoying in "sausage making" workflows. Thanks for reporting this issue, I don't know why I didn't think of reporting it myself :) It likely affects a large portion of the users who like to set rebase.autostash and rebase.autosquash` in their config, but for some reason they didn't think of reporting it either.

Philippe

#4 lore raw
In reply to Karen Etheridge

[ Cc-ing Ramkumar ]

Quoted 9 lines · Karen Etheridge

scenario:
- edit some tracked files; do not add them to the index
- "git config rebase.autostash true"
- "git rebase -i HEAD~3" (an autostash will be created)
- delete the entire buffer and save/exit the editor - this will abort the rebase

poof, the autostash is gone (it is not reapplied) -- it must be explicitly applied again via the SHA that was printed earlier.

Indeed. Confirmed, even with pu (I thought I remembered seeing a fix on the list, but I must have mixed up with something else).

Signature · 2 lines
Matthieu Moy
http://www-verimag.imag.fr/~moy/
#5 lore raw
Quoted 11 lines · Matthieu Moy

[ Cc-ing Ramkumar ]

Quoted 7 lines · Karen Etheridge

scenario:
- edit some tracked files; do not add them to the index
- "git config rebase.autostash true"
- "git rebase -i HEAD~3" (an autostash will be created)
- delete the entire buffer and save/exit the editor - this will abort the rebase

Quoted 5 lines
Quoted 2 lines

poof, the autostash is gone (it is not reapplied) -- it must be explicitly applied again via the SHA that was printed earlier.

Indeed. Confirmed, even with pu (I thought I remembered seeing a fix on the list, but I must have mixed up with something else).

Thanks. I see Ram's patch to address this on the list. Will pick it up and queue for post-release, as this is a fairly old breakage dating as far back as v1.8.4, if I am not mistaken.