Subject: Re: [PATCH v4 1/2] t4014: cleanups in a few tests

From: Junio C Hamano <[email-masked]>
Date: Fri, 07 Jun 2024 11:57:42 -0700

Rubén Justo <[email-masked]> writes:

>> If "notes add" fails to create a note for HEAD, test_when_finished
>> would notice that it cannot remove a note from HEAD, wouldn't it?
>
> Yep.  Something like this, no?

That's following the "grep for them" advice ;-)

>> A failure in the when-finished handler is noticed (which we might
>> argue is a misfeature)
>
> Dropping it doesn't seem like something to be strongly opposed to :-)

It does protect us from careless test writers.  At least, when we
see the care has been taken to make sure the "clean-up" tasks covers
both cases where the main test did or failed to create the cruft to
be removed, that assures us that the test writers were thinking it
through.

But of course, those who blindly cut and paste the "|| :" pattern
would fool such protection measure X-<.

;-)