diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-12-10 13:11:44 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-12-10 13:11:44 -0800 |
commit | 55c37d12d3b105856cb8085c5d7e26bed313e863 (patch) | |
tree | 315b642382f66843867937cc33e91bc73d9e85c0 /t/perf | |
parent | Merge branch 'ds/commit-graph-delay-gen-progress' (diff) | |
parent | t/perf: don't depend on Git.pm (diff) | |
download | tgif-55c37d12d3b105856cb8085c5d7e26bed313e863.tar.xz |
Merge branch 'jk/perf-wo-git-dot-pm'
Test cleanup.
* jk/perf-wo-git-dot-pm:
t/perf: don't depend on Git.pm
Diffstat (limited to 't/perf')
-rwxr-xr-x | t/perf/aggregate.perl | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/t/perf/aggregate.perl b/t/perf/aggregate.perl index 112fc23dbe..14e4cda287 100755 --- a/t/perf/aggregate.perl +++ b/t/perf/aggregate.perl @@ -4,7 +4,6 @@ use lib '../../perl/build/lib'; use strict; use warnings; use Getopt::Long; -use Git; use Cwd qw(realpath); sub get_times { @@ -85,6 +84,11 @@ sub format_size { return $out; } +sub sane_backticks { + open(my $fh, '-|', @_); + return <$fh>; +} + my (@dirs, %dirnames, %dirabbrevs, %prefixes, @tests, $codespeed, $sortby, $subsection, $reponame); @@ -102,7 +106,8 @@ while (scalar @ARGV) { my $prefix = ''; last if -f $arg or $arg eq "--"; if (! -d $arg) { - my $rev = Git::command_oneline(qw(rev-parse --verify), $arg); + my $rev = sane_backticks(qw(git rev-parse --verify), $arg); + chomp $rev; $dir = "build/".$rev; } elsif ($arg eq '.') { $dir = '.'; |