summaryrefslogtreecommitdiff
path: root/t/perf/aggregate.perl
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-12-10 21:11:44 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-12-10 21:11:44 (GMT)
commit55c37d12d3b105856cb8085c5d7e26bed313e863 (patch)
tree315b642382f66843867937cc33e91bc73d9e85c0 /t/perf/aggregate.perl
parent41dac79c2f49f9ea1c808f0f208bde9aa4ed91cb (diff)
parent528d9e6d0190b0ab8fbbab0b7b1b68f512f5dfcd (diff)
downloadgit-55c37d12d3b105856cb8085c5d7e26bed313e863.zip
git-55c37d12d3b105856cb8085c5d7e26bed313e863.tar.gz
git-55c37d12d3b105856cb8085c5d7e26bed313e863.tar.bz2
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/aggregate.perl')
-rwxr-xr-xt/perf/aggregate.perl9
1 files changed, 7 insertions, 2 deletions
diff --git a/t/perf/aggregate.perl b/t/perf/aggregate.perl
index 112fc23..14e4cda 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 = '.';