]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Import.pm
v2: support incremental indexing + purge
[public-inbox.git] / lib / PublicInbox / Import.pm
index 73290eed5a04d37a8328eb39bd217cf2258fd6a7..2529798fe4b7adc40424dad7b32341ccd9597ac0 100644 (file)
@@ -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};