]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Xapcmd.pm
update copyrights for 2021
[public-inbox.git] / lib / PublicInbox / Xapcmd.pm
index fffac99c7f4bc371544e91e3d6d21e9193a6e726..8de516ef5ace4f2c52ca840f52f7fe6ec3979944 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2018-2020 all contributors <meta@public-inbox.org>
+# Copyright (C) 2018-2021 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 package PublicInbox::Xapcmd;
 use strict;
@@ -37,7 +37,7 @@ sub commit_changes ($$$$) {
                        defined $new or die "BUG: $over exists when culling v2";
                        $over = PublicInbox::Over->new($over);
                        my $tmp_over = "$new/over.sqlite3";
-                       $over->connect->sqlite_backup_to_file($tmp_over);
+                       $over->dbh->sqlite_backup_to_file($tmp_over);
                        $over = undef;
                        $over_chg = 1;
                }
@@ -109,8 +109,7 @@ sub prepare_reindex ($$$) {
                        $opt->{reindex}->{from} = $lc;
                }
        } else { # v2
-               my $max;
-               $im->git_dir_latest(\$max) or return;
+               my $max = $ibx->max_git_epoch // return;
                my $from = $opt->{reindex}->{from};
                my $mm = $ibx->mm;
                my $v = PublicInbox::Search::SCHEMA_VERSION();
@@ -271,7 +270,6 @@ sub run {
 
        local %SIG = %SIG;
        setup_signals();
-       $ibx->umask_prepare;
        $ibx->with_umask(\&_run, $ibx, $cb, $opt);
 }