checkout tests: don't ignore "git <cmd>" exit code
commitc419562860e3baf1cd3ae1ed9cb7cce6ab06cbd5
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Mon, 7 Mar 2022 12:49:05 +0000 (7 13:49 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 7 Mar 2022 21:27:41 +0000 (7 13:27 -0800)
treed66bd546584c100748bde0b9d876701d7c5fd2bd
parente19b3199506a47098d1ca7b21a5e37cabb70f7f2
checkout tests: don't ignore "git <cmd>" exit code

Change a fragile pattern introduced in 696acf45f96 (checkout:
implement "-" abbreviation, add docs and tests, 2009-01-17) to check
the exit code of both "git symbolic-ref" and "git rev-parse".

Without this change this test will become flaky e.g. under
SANITIZE=leak if some (but not all) memory leaks revealed by these
commands are fixed.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t2012-checkout-last.sh