]> Kevux Git Server - rit/commit
t/perf/aggregate.perl: tolerate leading spaces
authorTaylor Blau <me@ttaylorr.com>
Sun, 3 Oct 2021 05:14:49 +0000 (01:14 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 4 Oct 2021 21:12:28 +0000 (14:12 -0700)
commit76f3b69896bf72bb195497d54c7e2f19821a7305
tree45f406554653c37a9af403652ccd102cdae82bde
parent225bc32a989d7a22fa6addafd4ce7dcd04675dbf
t/perf/aggregate.perl: tolerate leading spaces

When using `test_size` with `wc -c`, users on certain platforms can run
into issues when `wc` emits leading space characters in its output,
which confuses get_times.

Callers could switch to use test_file_size instead of `wc -c` (the
former never prints leading space characters, so will always work with
test_size regardless of platform), but this is an easy enough spot to
miss that we should teach get_times to be more tolerant of the input it
accepts.

Teach get_times to do just that by stripping any leading space
characters.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/perf/aggregate.perl