about summary refs log tree commit homepage
path: root/lib/PublicInbox/Import.pm
diff options
context:
space:
mode:
authorEric Wong (Contractor, The Linux Foundation) <e@80x24.org>2018-04-04 21:24:59 +0000
committerEric Wong (Contractor, The Linux Foundation) <e@80x24.org>2018-04-04 21:54:44 +0000
commit678fb3c2ba03a4a284620c039717c0d94dd6106a (patch)
tree29b213f82977aa3ccf83d0fc80d8b126b583fb45 /lib/PublicInbox/Import.pm
parentb4d127cb83230fe5cee0dcecb573107ad96a7c4c (diff)
downloadpublic-inbox-678fb3c2ba03a4a284620c039717c0d94dd6106a.tar.gz
This is important for people running mirrors via "git fetch",
as they need to be kept up-to-date.  Purging is also now
supported in mirrors.

The short-lived "--regenerate" option is gone and is now
implicitly enabled as a result.  It's still cheap when
article number regeneration is unnecessary, as we track
the range for each git repository.
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};