summaryrefslogtreecommitdiff
path: root/t/t5515/refs.br-config-explicit-merge_config-explicit
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2019-04-23 00:34:20 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-04-24 10:21:06 +0900
commitf2e875d6df20a71c8d5b73e16e37763dcc8264b4 (patch)
tree1ca517c862891d131615aa4a76d130947d9904a3 /t/t5515/refs.br-config-explicit-merge_config-explicit
parentThe sixth batch (diff)
downloadtgif-f2e875d6df20a71c8d5b73e16e37763dcc8264b4.tar.xz
t/perf: depend on perl JSON only when using --codespeed
Commit 05eb1c37ed (perf/aggregate: implement codespeed JSON output, 2018-01-05) added a dependency on the perl JSON module to show output from aggregate.perl, but we only need it when the user asks for --codespeed output. While the module is pretty common, it's not part of the base system, and this dependency can get in the way of producing the default human-readable output. Let's bump the "use" down to a "require" in the code path that needs it, which will be interpreted at run-time instead of compile-time. People not using "--codespeed" won't even load the module, and anybody using it should see the same results (including the same perl error if they don't have it). Note that this skips the importing step, so we'll have to fully qualify our function call. We could accomplish the same thing in other ways. E.g., calling JSON->import() ourselves, or wrapping "use JSON" in an eval. Since there's only one such call, this seems like the least-magical way of doing it. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5515/refs.br-config-explicit-merge_config-explicit')
0 files changed, 0 insertions, 0 deletions