lib/PublicInbox/Git.pm | 1 - lib/PublicInbox/Import.pm | 6 ++---- diff --git a/lib/PublicInbox/Git.pm b/lib/PublicInbox/Git.pm index ac7ff267a1033cb8bbc8234f8ad0b381ff23c94f..e176921c74439ee2c6e2a4b6e6e11cfb313f2874 100644 --- a/lib/PublicInbox/Git.pm +++ b/lib/PublicInbox/Git.pm @@ -364,7 +364,6 @@ # same args as popen above sub qx { my $fh = popen(@_); if (wantarray) { - local $/ = "\n"; my @ret = <$fh>; close $fh; # caller should check $? @ret; diff --git a/lib/PublicInbox/Import.pm b/lib/PublicInbox/Import.pm index a070aa1e9be0f6969d09eb1111fd5494b8320b5b..e803ee74c2b8d06c11e7361ef0f32a5d5fd1363e 100644 --- a/lib/PublicInbox/Import.pm +++ b/lib/PublicInbox/Import.pm @@ -68,11 +68,9 @@ local $/ = "\n"; chomp($self->{tip} = $git->qx(qw(rev-parse --revs-only), $ref)); die "fatal: rev-parse --revs-only $ref: \$?=$?" if $?; if ($self->{path_type} ne '2/38' && $self->{tip}) { - local $/ = "\0"; - my @t = $git->qx(qw(ls-tree -r -z --name-only), $ref); + my $t = $git->qx(qw(ls-tree -r -z --name-only), $ref); die "fatal: ls-tree -r -z --name-only $ref: \$?=$?" if $?; - chomp @t; - $self->{-tree} = { map { $_ => 1 } @t }; + $self->{-tree} = { map { $_ => 1 } split(/\0/, $t) }; } $in_r = $self->{in} = $git->popen(qw(fast-import --quiet --done --date-format=raw),