about summary refs log tree commit homepage
path: root/lib/PublicInbox/Import.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-08-02 08:32:09 +0000
committerEric Wong <e@80x24.org>2016-08-02 08:41:43 +0000
commit4caa17ef5aa8554d78b8c013096f12429c58e050 (patch)
tree651bda4a566e7625445e194270be6f01d5c8aa3f /lib/PublicInbox/Import.pm
parentb7c4bca292fb1f7ac4d73ff96b2ce95185b4fc66 (diff)
downloadpublic-inbox-4caa17ef5aa8554d78b8c013096f12429c58e050.tar.gz
For reindexing, fresh Xapian DBs do not count as a reindex,
allowing users to blindly use --reindex on the first
run on a clean repo.

While we're at it, allow indexing to override HEAD ref for
multi-head git repos.
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 bb0811a5..b3812a63 100644
--- a/lib/PublicInbox/Import.pm
+++ b/lib/PublicInbox/Import.pm
@@ -237,7 +237,8 @@ sub done {
 
                 eval {
                         require PublicInbox::SearchIdx;
-                        PublicInbox::SearchIdx->new($git_dir, 2)->index_sync;
+                        my $s = PublicInbox::SearchIdx->new($git_dir, 2);
+                        $s->index_sync({ ref => $self->{ref} });
                 };
         }