about summary refs log tree commit homepage
path: root/public-inbox-learn
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2015-08-17 08:19:44 +0000
committerEric Wong <e@80x24.org>2015-08-17 08:51:35 +0000
commitc59caac2ee502dfd8b3acb1ca268c597719313f8 (patch)
tree8a44cb79c11d2995198e81ec99975b0aeb1de18a /public-inbox-learn
parent94f13e1f179c4b7c43d75f1154eec178718988c8 (diff)
downloadpublic-inbox-c59caac2ee502dfd8b3acb1ca268c597719313f8.tar.gz
We'll ignore errors, for now, but should eventually warn or
log.  And yes, this is a dirty, dirty hack but we'll fix this
ASAP tomorrow.
Diffstat (limited to 'public-inbox-learn')
-rwxr-xr-xpublic-inbox-learn10
1 files changed, 10 insertions, 0 deletions
diff --git a/public-inbox-learn b/public-inbox-learn
index d3a05abe..7f525f55 100755
--- a/public-inbox-learn
+++ b/public-inbox-learn
@@ -76,5 +76,15 @@ foreach my $recipient (keys %dests) {
         if (!run([qw(spamc -L), $train], \$in, @output)) {
                 $err = 1;
         }
+
+        $err or eval {
+                require PublicInbox::Search;
+                require PublicInbox::GitCatFile;
+                my $git = PublicInbox::GitCatFile->new($git_dir);
+                umask 0022; # XXX FIXME use git config core.sharedRepository
+                my $s = PublicInbox::Search->new($git_dir, 1);
+                $s->index_sync($git);
+        };
 }
+
 exit $err;