lib/PublicInbox/Import.pm | 2 +-
t/lei_store.t | 5 ++++-
diff --git a/lib/PublicInbox/Import.pm b/lib/PublicInbox/Import.pm
index aef49033cc4e0d4767a67d1ec78643b6ab05be2d..2c8f310acffedc488d3e6ac45bc2ed875819033f 100644
--- a/lib/PublicInbox/Import.pm
+++ b/lib/PublicInbox/Import.pm
@@ -182,8 +182,8 @@ if (-e $index && !$ENV{FAST}) {
my $env = { GIT_INDEX_FILE => $index };
run_die([@cmd, qw(read-tree -m -v -i), $self->{ref}], $env);
}
- eval { run_die([@cmd, 'update-server-info']) };
my $ibx = $self->{ibx};
+ eval { run_die([@cmd, 'update-server-info']) } if $ibx;
if ($ibx && $ibx->version == 1 && -d "$ibx->{inboxdir}/public-inbox" &&
eval { require PublicInbox::SearchIdx }) {
eval {
diff --git a/t/lei_store.t b/t/lei_store.t
index 40ad7800981318a69ef3fc351b4ea713c6039cca..5a5e5de03e16452467c07d44528dca1dacc516b3 100644
--- a/t/lei_store.t
+++ b/t/lei_store.t
@@ -1,5 +1,5 @@
#!perl -w
-# Copyright (C) 2020-2021 all contributors
+# Copyright (C) all contributors
# License: AGPL-3.0+
use strict;
use v5.10.1;
@@ -148,5 +148,8 @@ $lse->query_approxidate($lse->git, $qstr);
my $mset = $lse->mset($qstr);
is($mset->size, 1, 'rt:1.hour.ago.. works w/ local time');
}
+
+is_deeply([glob("$store_dir/local/*.git/info/refs")], [],
+ 'no info/refs in private lei/store');
done_testing;