about summary refs log tree commit homepage
path: root/public-inbox-mda
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-02-02 04:00:08 +0000
committerEric Wong <e@80x24.org>2016-02-02 04:07:19 +0000
commitd39a8a440c9b5c59e1fa058467f64034f8974e0e (patch)
treee91838195760216d9b3c0dda5931d3d88aa53cf6 /public-inbox-mda
parent4c808e262750b717e27e050cecaed0a44e780aa6 (diff)
downloadpublic-inbox-d39a8a440c9b5c59e1fa058467f64034f8974e0e.tar.gz
This is enabled by default, for now.
Smart HTTP cloning support will be added later, but it will
be optional since it can be highly CPU and memory intensive.
Diffstat (limited to 'public-inbox-mda')
-rwxr-xr-xpublic-inbox-mda8
1 files changed, 6 insertions, 2 deletions
diff --git a/public-inbox-mda b/public-inbox-mda
index 73c4ae1c..24feeb81 100755
--- a/public-inbox-mda
+++ b/public-inbox-mda
@@ -62,7 +62,7 @@ if (PublicInbox::MDA->precheck($filter, $dst->{address}) &&
                                         PublicInbox::MDA->author_info($msg);
 
                         END {
-                                search_index_sync($main_repo) if ($? == 0);
+                                index_sync($main_repo) if ($? == 0);
                         };
 
                         local $ENV{GIT_AUTHOR_NAME} = $name;
@@ -98,8 +98,12 @@ sub do_spamc {
         return ($@ || $? || !defined($$out) || $$out eq '') ? 0 : 1;
 }
 
-sub search_index_sync {
+sub index_sync {
         my ($git_dir) = @_;
+
+        # potentially user-visible, ignore errors:
+        system('git', "--git-dir=$git_dir", 'update-server-info');
+
         eval {
                 require PublicInbox::SearchIdx;
                 PublicInbox::SearchIdx->new($git_dir, 2)->index_sync;