X-Git-Url: http://www.git.stargrave.org/?p=public-inbox.git;a=blobdiff_plain;f=lib%2FPublicInbox%2FXapcmd.pm;h=19c6ff077d21911f003888edd2cc74a0b99f16e5;hp=de2ef5c6ad814dae358611f97ef6fe9ba955c9fb;hb=227a1d886672767e37cc86a3432952c14eb8a143;hpb=fcfa0d639da338c470f07942da71f78fa65354a1 diff --git a/lib/PublicInbox/Xapcmd.pm b/lib/PublicInbox/Xapcmd.pm index de2ef5c6..19c6ff07 100644 --- a/lib/PublicInbox/Xapcmd.pm +++ b/lib/PublicInbox/Xapcmd.pm @@ -97,7 +97,7 @@ sub runnable_or_die ($) { sub prepare_reindex ($$$) { my ($ibx, $im, $reindex) = @_; - if ($ibx->{version} == 1) { + if ($ibx->version == 1) { my $dir = $ibx->search->xdir(1); my $xdb = $PublicInbox::Search::X{Database}->new($dir); if (my $lc = $xdb->get_metadata('last_commit')) { @@ -173,7 +173,6 @@ sub run { -d $old or die "$old does not exist\n"; my $tmp = {}; - my $v = $ibx->{version} ||= 1; my @q; my $reshard = $opt->{reshard}; if (defined $reshard && $reshard <= 0) { @@ -185,7 +184,7 @@ sub run { # we want temporary directories to be as deep as possible, # so v2 shards can keep "xap$SCHEMA_VERSION" on a separate FS. - if ($v == 1) { + if ($ibx->version == 1) { if (defined $reshard) { warn "--reshard=$reshard ignored for v1 $ibx->{inboxdir}\n";