Skip to content

Commit 55c37d1

Browse files
committed
Merge branch 'jk/perf-wo-git-dot-pm'
Test cleanup. * jk/perf-wo-git-dot-pm: t/perf: don't depend on Git.pm
2 parents 41dac79 + 528d9e6 commit 55c37d1

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

t/perf/aggregate.perl

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
use strict;
55
use warnings;
66
use Getopt::Long;
7-
use Git;
87
use Cwd qw(realpath);
98

109
sub get_times {
@@ -85,6 +84,11 @@ sub format_size {
8584
return $out;
8685
}
8786

87+
sub sane_backticks {
88+
open(my $fh, '-|', @_);
89+
return <$fh>;
90+
}
91+
8892
my (@dirs, %dirnames, %dirabbrevs, %prefixes, @tests,
8993
$codespeed, $sortby, $subsection, $reponame);
9094

@@ -102,7 +106,8 @@ sub format_size {
102106
my $prefix = '';
103107
last if -f $arg or $arg eq "--";
104108
if (! -d $arg) {
105-
my $rev = Git::command_oneline(qw(rev-parse --verify), $arg);
109+
my $rev = sane_backticks(qw(git rev-parse --verify), $arg);
110+
chomp $rev;
106111
$dir = "build/".$rev;
107112
} elsif ($arg eq '.') {
108113
$dir = '.';

0 commit comments

Comments
 (0)