Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2021-10-15 02:37:14 +0300
committerJunio C Hamano <gitster@pobox.com>2021-10-15 19:21:30 +0300
commit3247919a758710692e316a13c209e13933936d51 (patch)
tree5848df0ec554474bb5f572ff5cc16b8dd89abe67 /t/t5318-commit-graph.sh
parentaf6d1d602a8f64164b266364339c4e936d5bbc33 (diff)
commit-graph tests: fix error-hiding graph_git_two_modes() helper
The graph_git_two_modes() helper added in 177722b3442 (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>
Diffstat (limited to 't/t5318-commit-graph.sh')
-rwxr-xr-xt/t5318-commit-graph.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t5318-commit-graph.sh b/t/t5318-commit-graph.sh
index af88f805aa..579067299e 100755
--- a/t/t5318-commit-graph.sh
+++ b/t/t5318-commit-graph.sh
@@ -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
}