}
return;
}
- $head =~ /^[0-9a-f]{40} \S+ (\d+)$/ or
+ $head =~ /^[0-9a-f]{40} \S+ ([0-9]+)$/ or
fail($self, "Unexpected result from git cat-file: $head");
my $size = $1;
}
sub _destroy {
- my ($self, $in, $out, $pid) = @_;
+ my ($self, $in, $out, $pid, $err) = @_;
my $p = delete $self->{$pid} or return;
delete @$self{($in, $out)};
+ delete $self->{$err} if $err; # `err_c'
waitpid $p, 0;
}
sub cleanup {
my ($self) = @_;
_destroy($self, qw(in out pid));
- _destroy($self, qw(in_c out_c pid_c));
+ _destroy($self, qw(in_c out_c pid_c err_c));
!!($self->{pid} || $self->{pid_c});
}
foreach my $oid (<$fh>) {
chomp $oid;
my $buf = cat_file($self, $oid) or next;
- $$buf =~ /^committer .*?> (\d+) [\+\-]?\d+/sm or next;
+ $$buf =~ /^committer .*?> ([0-9]+) [\+\-]?[0-9]+/sm or next;
my $cmt_time = $1;
$modified = $cmt_time if $cmt_time > $modified;
}