about summary refs log tree commit homepage
path: root/lib/PublicInbox/Import.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox/Import.pm')
-rw-r--r--lib/PublicInbox/Import.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/PublicInbox/Import.pm b/lib/PublicInbox/Import.pm
index 73290eed..2529798f 100644
--- a/lib/PublicInbox/Import.pm
+++ b/lib/PublicInbox/Import.pm
@@ -192,6 +192,7 @@ sub get_mark {
         my ($r, $w) = $self->gfi_start;
         print $w "get-mark $mark\n" or wfail;
         defined(my $oid = <$r>) or die "get-mark failed, need git 2.6.0+\n";
+        chomp($oid);
         $oid;
 }
 
@@ -379,7 +380,7 @@ sub add {
 
         # v2: we need this for Xapian
         if ($self->{want_object_info}) {
-                chomp(my $oid = $self->get_mark(":$blob"));
+                my $oid = $self->get_mark(":$blob");
                 $self->{last_object} = [ $oid, $n, \$str ];
         }
         my $ref = $self->{ref};