use PublicInbox::MID qw(mid_mime mid2path);
sub new {
- my ($class, $git, $name, $email) = @_;
+ my ($class, $git, $name, $email, $inbox) = @_;
bless {
git => $git,
ident => "$name <$email>",
mark => 1,
ref => 'refs/heads/master',
+ inbox => $inbox,
}, $class
}
eval {
require PublicInbox::SearchIdx;
- my $s = PublicInbox::SearchIdx->new($git_dir);
+ my $inbox = $self->{inbox} || $git_dir;
+ my $s = PublicInbox::SearchIdx->new($inbox);
$s->index_sync({ ref => $self->{ref} });
};
}