Skip to content

Commit e1ebb56

Browse files
rscharfegitster
authored andcommitted
p0004: avoid using pipes
The return code of commands on the producing end of a pipe is ignored. Evaluate the outcome of test-lazy-init-name-hash by calling sort separately. Signed-off-by: Rene Scharfe <[email protected]> Acked-by: Jeff Hostetler <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 1c002d0 commit e1ebb56

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

t/perf/p0004-lazy-init-name-hash.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ test_perf_large_repo
77
test_checkout_worktree
88

99
test_expect_success 'verify both methods build the same hashmaps' '
10-
test-lazy-init-name-hash --dump --single | sort >out.single &&
11-
test-lazy-init-name-hash --dump --multi | sort >out.multi &&
12-
test_cmp out.single out.multi
10+
test-lazy-init-name-hash --dump --single >out.single &&
11+
test-lazy-init-name-hash --dump --multi >out.multi &&
12+
sort <out.single >sorted.single &&
13+
sort <out.multi >sorted.multi &&
14+
test_cmp sorted.single sorted.multi
1315
'
1416

1517
test_expect_success 'multithreaded should be faster' '

0 commit comments

Comments
 (0)