-sub async_prefetch {
- my ($self, $oid, $cb, $arg) = @_;
- if (my $inflight = $self->{inflight}) {
- # we could use MAX_INFLIGHT here w/o the halving,
- # but lets not allow one client to monopolize a git process
- if (scalar(@$inflight) < int(MAX_INFLIGHT/2)) {
- print { $self->{out} } $oid, "\n" or
- fail($self, "write error: $!");
- return push(@$inflight, $oid, $cb, $arg);
- }
- }
- undef;
-}
-
-sub extract_cmt_time {
- my ($bref, undef, undef, undef, $modified) = @_;
-
- if ($$bref =~ /^committer .*?> ([0-9]+) [\+\-]?[0-9]+/sm) {
- my $cmt_time = $1 + 0;
- $$modified = $cmt_time if $cmt_time > $$modified;
- }
-}
-