diff options
author | Eric Wong <e@80x24.org> | 2016-02-02 04:00:08 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-02-02 04:07:19 +0000 |
commit | d39a8a440c9b5c59e1fa058467f64034f8974e0e (patch) | |
tree | e91838195760216d9b3c0dda5931d3d88aa53cf6 /public-inbox-mda | |
parent | 4c808e262750b717e27e050cecaed0a44e780aa6 (diff) | |
download | public-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-x | public-inbox-mda | 8 |
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; |