my ($name, $email, $date) =
PublicInbox::MDA->author_info($msg);
+
+ END {
+ search_index_sync($main_repo) if ($? == 0);
+ };
+
local $ENV{GIT_AUTHOR_NAME} = $name;
local $ENV{GIT_AUTHOR_EMAIL} = $email;
local $ENV{GIT_AUTHOR_DATE} = $date;
return ($@ || $? || !defined($$out) || length($$out) == 0) ? 0 : 1;
}
+
+sub search_index_sync {
+ my ($git_dir) = @_;
+ eval {
+ require PublicInbox::Search;
+ umask 0022; # XXX FIXME use git config core.sharedRepository
+ my $s = PublicInbox::Search->new($git_dir, 2);
+ $s->index_sync;
+ };
+}