Re: [BUG] rebase --onto doesn't abort properly
- From
Ramkumar Ramachandra <artagnon@gmail.com>
- Date
- Jan 6, 2014, 18:55 UTC
- Message-ID
- <CALkWK0=a-jh_r0c-hYstyVAatfF4nwBk3uYQ6RX+0=8VsPasVQ@mail.gmail.com>
- In-Reply-To
- <xmqqha9hhrvz.fsf@gitster.dls.corp.google.com>
Junio C Hamano wrote:
> I do not think --abort was designed to abort an uncontrolled stop > like ^C in the first place.
Why not? All it requires is a reset --hard to .git/rebase-apply/head-name, as usual, no?
> To allow that kind of "recovery", you > need to teach "rebase" to first record the state you would want to > go back to before doing anything, but then what happens if the ^C > comes when you are still in the middle of doing so?
I'm a bit puzzled: doesn't rebase write_basic_state() as soon as it starts? It's true that we can't recover from a ^C before that, but I would expect to be able to recover after a ^C somewhere in the middle.