diff options
author | Eric Wong <e@80x24.org> | 2023-10-17 23:38:14 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2023-10-18 20:50:43 +0000 |
commit | 6b4085ee24b0d946acb85f60f4dbfdeaa7bd75b3 (patch) | |
tree | c49b2385b07c470e675fcefa3f2faedeb424acbf /script | |
parent | b96f9ce6dc6f3acaeb50ea8a392103ac3e6112b1 (diff) | |
download | public-inbox-6b4085ee24b0d946acb85f60f4dbfdeaa7bd75b3.tar.gz |
There wasn't a need to loop anyways with Perl `read' since the default PerlIO layer will retry.
Diffstat (limited to 'script')
-rwxr-xr-x | script/public-inbox-convert | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/script/public-inbox-convert b/script/public-inbox-convert index 0cc52777..96f6d2ea 100755 --- a/script/public-inbox-convert +++ b/script/public-inbox-convert @@ -130,14 +130,8 @@ while (<$rd>) { } elsif (/^commit /) { $state = 'commit'; } elsif (/^data ([0-9]+)/) { - my $len = $1; print $io $_ or $im->wfail; - while ($len) { - my $n = read($rd, my $tmp, $len) or die "read: $!"; - warn "$n != $len\n" if $n != $len; - $len -= $n; - print $io $tmp or $im->wfail; - } + print $io PublicInbox::Git::read_all($rd, $1) or $im->wfail; next; } elsif ($state eq 'commit') { if (m{^M 100644 :([0-9]+) (${h}{2}/${h}{38})}o) { |