- while (<$fh>) {
- ($cmt, $type) = split / /;
- next if $type ne 'blob';
- ++$n;
- $str = $git->cat_file($cmt);
- $mime = PublicInbox::MIME->new($str);
- $res = PublicInbox::View::msg_html($ctx, $mime);
- $res = $res->[2];
- while (defined($res->getline)) {}
- $res->close;
+ $ctx->{obuf} = \$obuf;
+ $ctx->{mhref} = '../';
+ if (defined $blob) {
+ my $nr = $ENV{NR} // 10000;
+ for (1..$nr) {
+ ++$n;
+ $git->cat_async($blob, $cb);
+ }
+ } else {
+ while (<$fh>) {
+ ($oid, $type) = split / /;
+ next if $type ne 'blob';
+ ++$n;
+ $git->cat_async($oid, $cb);
+ }