lib/PublicInbox/V2Writable.pm | 2 +- t/v2reindex.t | 5 +++++ diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm index cbd4f003c6581d7121ead99be8b122e05ed25a0c..03590850973e0589000b29884d2f812759d128ae 100644 --- a/lib/PublicInbox/V2Writable.pm +++ b/lib/PublicInbox/V2Writable.pm @@ -1216,7 +1216,7 @@ } sub index_xap_only { # git->cat_async callback my ($bref, $oid, $type, $size, $smsg) = @_; - my $self = $smsg->{self}; + my $self = delete $smsg->{self}; my $idx = idx_shard($self, $smsg->{num}); $idx->index_eml(PublicInbox::Eml->new($bref), $smsg); $self->{transact_bytes} += $smsg->{bytes}; diff --git a/t/v2reindex.t b/t/v2reindex.t index 05ea952f43e1002f08028d5bb277208f816bb8d3..56540c8b1847bbd4ea7aad3d6c0f04cb14569781 100644 --- a/t/v2reindex.t +++ b/t/v2reindex.t @@ -543,4 +543,9 @@ # XXX: not deterministic when dealing with ambiguous messages, oh well $check_rethread->('3-headed-monster once'); $check_rethread->('3-headed-monster twice'); +my $rdr = { 2 => \(my $err = '') }; +ok(run_script([qw(-index --reindex --xapian-only), $inboxdir], undef, $rdr), + '--xapian-only works'); +is($err, '', 'no errors from --xapian-only'); + done_testing();