From 678fb3c2ba03a4a284620c039717c0d94dd6106a Mon Sep 17 00:00:00 2001 From: "Eric Wong (Contractor, The Linux Foundation)" Date: Wed, 4 Apr 2018 21:24:59 +0000 Subject: v2: support incremental indexing + purge 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. --- lib/PublicInbox/Import.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/PublicInbox/Import.pm') 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}; -- cgit v1.2.3-24-ge0c7