Re: [PATCH 1/3] t2018: cleanup in current test
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 26, 2019, 02:50 UTC
- Message-ID
- <xmqqtvelv5t0.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <CAPig+cTdJv9-M+zmp+Jo2bjOrkO3NgsguJ2xM+aXhf38OjjEEw@mail.gmail.com>
Eric Sunshine <sunshine@sunshineco.com> writes:
Show 14 quoted lines
>> test_expect_success 'checkout -b to a new branch, set to HEAD' ' >> + test_when_finished test_might_fail git branch -D branch2 && >> + test_when_finished git checkout branch1 && > > I'm aware that when-finished actions fire in reverse order but the > inherent subtlety of ordering of these two invocations still caught me > off-guard for a moment since they are reverse the order in which one > logically thinks about the actions which need to be performed. I > wonder if it would be easier to digest if written like this: > > test_when_finished ' > git checkout branch1 && > test_might_fail git branch -D branch2 > ' &&
Perhaps. Be careful in choosing the quotes between sq and dq, though.