Subject: Re: [PATCHv6 1/3] git-rebase -i: add command "drop" to remove a commit

From: Junio C Hamano <[email-masked]>
Date: Tue, 23 Jun 2015 13:37:34 -0700

Junio C Hamano <[email-masked]> writes:

> Galan Rémi  <[email-masked]> writes:
>
>> +test_rebase_end () {
>> +	test_when_finished "git checkout master &&
>> +	git branch -D $1 &&
>
> Is this one guaranteed to succeed?  Do we want to consider it a
> failure to remove "$1" (e.g. dropTest)?
>
>     $ git branch -D no-such-branch ; echo $?
>     error: branch 'no-such-branch' not found.
>     1
>
> If dropTest branch did not exist before the test that begins with
> a call to this function, what happens?
>
> Besides, a function that must be called at the beginning of a test
> piece has a name that ends with _end?  That sounds funny, no?

Ah, scratch this last paragraph.  I didn't see this is a
multi-command "when_finished".

But other parts of what I said still stands.  For example, even in a
multi-command "when_finished", "git branch -D $1 &&" if the main
body of the test failed to create the branch "$1", that command
would fail and skip the remainder of the clean-up, so the first
point above is still suspect.