From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
To: Junio C Hamano <gitster@pobox.com>
Cc: Patrick Steinhardt <ps@pks.im>,
git@vger.kernel.org,
Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Daniel Hahler <git@thequod.de>
Subject: Re: [PATCH] rebase -i: restore autostash on abort
Date: Tue, 28 Jun 2016 22:42:17 +0200 [thread overview]
Message-ID: <vpqvb0tqc46.fsf@anie.imag.fr> (raw)
In-Reply-To: <xmqqa8i587cx.fsf@gitster.mtv.corp.google.com> (Junio C. Hamano's message of "Tue, 28 Jun 2016 12:02:22 -0700")
Junio C Hamano <gitster@pobox.com> writes:
> Patrick Steinhardt <ps@pks.im> writes:
>
>> +test_expect_success 'restore autostash on editor failure' '
>> + test_when_finished "git reset --hard" &&
>> + echo uncommited-content >file0 &&
>> + (
>> + test_set_editor "false" &&
>> + test_must_fail git rebase -i --autostash HEAD^
>> + ) &&
>> + echo uncommited-content >expected &&
>
> While making sure this case works is crucial, it is not an
> interesting failure mode, is it? Can we also have "does not apply
> cleanly anymore" case, too?
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").
If you mean "likely to trigger nasty bugs", then indeed testing the case
when apply_autostash fails is interesting: for example, calling
die_abort when "stash apply" fails is tempting, but would lead to
infinite recursion (it doesn't seem to be the case, but a test would be
nice). Setting the editor to something that modifies uncommited-content
before 'false' should do the trick.
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
next prev parent reply other threads:[~2016-06-28 20:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-28 17:57 [PATCH] rebase -i: restore autostash on abort Patrick Steinhardt
2016-06-28 19:02 ` Junio C Hamano
2016-06-28 20:42 ` Matthieu Moy [this message]
2016-06-28 21:13 ` Junio C Hamano
2016-06-29 6:28 ` Patrick Steinhardt
2016-06-29 6:21 ` [PATCH v2] " Patrick Steinhardt
2016-06-29 14:02 ` Johannes Schindelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=vpqvb0tqc46.fsf@anie.imag.fr \
--to=matthieu.moy@grenoble-inp.fr \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@thequod.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=ps@pks.im \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.