]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/SearchIdx.pm
search: {version} => {ibx_ver}
[public-inbox.git] / lib / PublicInbox / SearchIdx.pm
index f14809d25fe361a827dc3f18a21e14a594594f2b..4349d127762a29504387d6c828dc4b33691b9032 100644 (file)
@@ -34,7 +34,7 @@ sub new {
        ref $ibx or die "BUG: expected PublicInbox::Inbox object: $ibx";
        my $levels = qr/\A(?:full|medium|basic)\z/;
        my $inboxdir = $ibx->{inboxdir};
-       my $version = $ibx->{version} || 1;
+       my $version = $ibx->version;
        my $indexlevel = 'full';
        my $altid = $ibx->{altid};
        if ($altid) {
@@ -54,7 +54,7 @@ sub new {
                -inbox => $ibx,
                git => $ibx->git,
                -altid => $altid,
-               version => $version,
+               ibx_ver => $version,
                indexlevel => $indexlevel,
        }, $class;
        $ibx->umask_prepare;
@@ -358,7 +358,7 @@ sub add_xapian ($$$$$$) {
 
 sub _msgmap_init ($) {
        my ($self) = @_;
-       die "BUG: _msgmap_init is only for v1\n" if $self->{version} != 1;
+       die "BUG: _msgmap_init is only for v1\n" if $self->{ibx_ver} != 1;
        $self->{mm} //= eval {
                require PublicInbox::Msgmap;
                PublicInbox::Msgmap->new($self->{inboxdir}, 1);
@@ -666,7 +666,6 @@ sub is_ancestor ($$$) {
        my $cmd = [ 'git', "--git-dir=$git->{git_dir}",
                qw(merge-base --is-ancestor), $cur, $tip ];
        my $pid = spawn($cmd);
-       defined $pid or die "spawning ".join(' ', @$cmd)." failed: $!";
        waitpid($pid, 0) == $pid or die join(' ', @$cmd) .' did not finish';
        $? == 0;
 }