t2018: teach do_checkout() to accept `!` arg
authorDenton Liu <redacted>
Tue, 7 Jan 2020 04:53:02 +0000 (23:53 -0500)
committerJunio C Hamano <redacted>
Mon, 27 Jan 2020 20:56:02 +0000 (12:56 -0800)
commit30c0367668ab919cc1bca3cff73820f77b573765
tree9977dec4944c1818493a1cacb2ca28432d02675b
parent40caa5366a84fba6e64ea32bf98d9c1aba0c537b
t2018: teach do_checkout() to accept `!` arg

We are running `test_must_fail do_checkout`. However,
`test_must_fail` should only be used on git commands. Teach
do_checkout() to accept `!` as a potential first argument which will
cause the function to expect the "git checkout" to fail.

This increases the granularity of the test as, instead of blindly
checking that do_checkout() failed, we check that only the specific
expected invocation of git fails.

Signed-off-by: Denton Liu <redacted>
Signed-off-by: Junio C Hamano <redacted>
t/t2018-checkout-branch.sh
git clone https://git.99rst.org/PROJECT