]> git.ipfire.org Git - thirdparty/git.git/commit
tests: don't lose exit status with "(cd ...; test <op> $(git ...))"
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Mon, 6 Feb 2023 22:44:30 +0000 (23:44 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 6 Feb 2023 23:30:41 +0000 (15:30 -0800)
commit0cd1a8818db35df70c88d7864682146bf4fa8227
treeea5b5a54e19053d5a44f436452f6e607c4585e24
parent62f3a45bb49f9436f1cd754b02ac549b1f6514cf
tests: don't lose exit status with "(cd ...; test <op> $(git ...))"

Rewrite tests that ran "git" inside command substitution and lost the
exit status of "git" so that we notice the failing "git".

Have them use modern patterns such as a "test_cmp" of the expected
outputs instead.

We'll fix more of these these in the subsequent commit, for now we're
only converting the cases where this loss of exit code was combined
with spawning a sub-shell.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/lib-httpd.sh
t/lib-submodule-update.sh
t/t0060-path-utils.sh
t/t3200-branch.sh
t/t5605-clone-local.sh
t/t7402-submodule-rebase.sh