Re: [PATCH] rebase -i: restore autostash on abort

2016-06-29 Thread Patrick Steinhardt
On Tue, Jun 28, 2016 at 02:13:49PM -0700, Junio C Hamano wrote: > Matthieu Moy writes: > > > It is "interesting" if you mean "matches real-life use-case", as it > > corresponds to the case where the user killed the editor (as reported by > > Daniel Hahler indeed,

Re: [PATCH] rebase -i: restore autostash on abort

2016-06-28 Thread Junio C Hamano
Matthieu Moy writes: > It is "interesting" if you mean "matches real-life use-case", as it > corresponds to the case where the user killed the editor (as reported by > Daniel Hahler indeed, "Abort with ":cq", which will make Vim exit > non-zero"). Yes. It is an

Re: [PATCH] rebase -i: restore autostash on abort

2016-06-28 Thread Matthieu Moy
Junio C Hamano writes: > Patrick Steinhardt writes: > >> +test_expect_success 'restore autostash on editor failure' ' >> +test_when_finished "git reset --hard" && >> +echo uncommited-content >file0 && >> +( >> +test_set_editor "false" &&

Re: [PATCH] rebase -i: restore autostash on abort

2016-06-28 Thread Junio C Hamano
Patrick Steinhardt writes: > When we abort an interactive rebase we do so by calling > `die_abort`, which cleans up after us by removing the rebase > state directory. If the user has requested to use the autostash > feature, though, the state directory may also contain a reference >

[PATCH] rebase -i: restore autostash on abort

2016-06-28 Thread Patrick Steinhardt
When we abort an interactive rebase we do so by calling `die_abort`, which cleans up after us by removing the rebase state directory. If the user has requested to use the autostash feature, though, the state directory may also contain a reference to the autostash, which will now be deleted. Fix