commit-graph tests: fix error-hiding graph_git_two_modes() helper

The graph_git_two_modes() helper added in 177722b344 (commit:
integrate commit graph with commit parsing, 2018-04-10) didn't
&&-chain its "git commit-graph" invocations, which as can be seen with
SANITIZE=leak will happily mark tests as passing if both of these
commands die, since test_cmp() will be comparing two empty files.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Ævar Arnfjörð Bjarmason 2021-10-15 01:37:14 +02:00 committed by Junio C Hamano
parent af6d1d602a
commit 3247919a75

View File

@ -51,8 +51,8 @@ test_expect_success 'create commits and repack' '
'
graph_git_two_modes() {
git -c core.commitGraph=true $1 >output
git -c core.commitGraph=false $1 >expect
git -c core.commitGraph=true $1 >output &&
git -c core.commitGraph=false $1 >expect &&
test_cmp expect output
}