t2018: cleanup in current test
authorDenton Liu <liu.denton@gmail.com>
Sat, 27 Apr 2019 12:02:19 +0000 (05:02 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 7 May 2019 04:23:10 +0000 (13:23 +0900)
Before, in t2018, if do_checkout failed to create `branch2`, the next
test-case would run `git branch -D branch2` but then fail because it was
expecting `branch2` to exist, even though it doesn't. As a result, an
early failure could cause a cascading failure of tests.

Make test-case responsible for cleaning up their own branches so that
future tests can start with a sane environment.

Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
No differences found