Skip to content

Commit 3247919

Browse files
avargitster
authored andcommitted
commit-graph tests: fix error-hiding graph_git_two_modes() helper
The graph_git_two_modes() helper added in 177722b (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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent af6d1d6 commit 3247919

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

t/t5318-commit-graph.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ test_expect_success 'create commits and repack' '
5151
'
5252

5353
graph_git_two_modes() {
54-
git -c core.commitGraph=true $1 >output
55-
git -c core.commitGraph=false $1 >expect
54+
git -c core.commitGraph=true $1 >output &&
55+
git -c core.commitGraph=false $1 >expect &&
5656
test_cmp expect output
5757
}
5858

0 commit comments

Comments
 (0)