Used with C<--reindex>, it will only look for new and stale
entries and not touch already-indexed messages.
+=item --no-multi-pack-index
+
+Disable writing a L<git-multi-pack-index(1)> file to save memory.
+Normally, enabling multi-pack-index speeds up startup time of
+subsequent L<git-cat-file(1)> processes by 3-4%, but generating
+this file requires several GB of memory with large repos.
+
+Unlike the C<core.multiPackIndex> directive in git, it's still
+possible to read existing multi-pack-index files if they are
+created elsewhere.
+
+Available in public-inbox 2.0.0+
+
=back
=head1 FILES
Do not update the C<all> external index by default. This negates
all uses of C<-E> / C<--update-extindex=> on the command-line.
+=item --no-multi-pack-index
+
+Disables writing the multi-pack-index when using L</--update-extindex>.
+See L<public-inbox-extindex(1)/--no-multi-pack-index> for details.
+
+Available in public-inbox 2.0.0+
+
=item --since=DATESTRING
=item --after=DATESTRING
($has_new || $prune_nr || $new ne '') and
$self->{mg}->write_alternates($mode, $alt, $new);
my $restore = $self->with_umask;
- if ($git_midx) {
+ if ($git_midx && ($opt->{'multi-pack-index'} // 1)) {
my @cmd = ('multi-pack-index');
push @cmd, '--no-progress' if ($opt->{quiet}//0) > 1;
my $lk = $self->lock_for_scope;
indexlevel|index-level|L=s max_size|max-size=s
batch_size|batch-size=s
dedupe:s@ gc commit-interval=i watch scan! dry-run|n
- all C=s@ help|h))
+ multi-pack-index! all C=s@ help|h))
or die $help;
if ($opt->{help}) { print $help; exit 0 };
die "--jobs must be >= 0\n" if defined $opt->{jobs} && $opt->{jobs} < 0;
batch_size|batch-size=s
since|after=s until|before=s
sequential-shard|seq-shard
+ multi-pack-index!
no-update-extindex update-extindex|E=s@
fast-noop|F skip-docdata all C=s@ help|h))
or die $help;
for (@xdb) {
ok(!$_->get_metadata('indexlevel'), 'no indexlevel in >0 shard')
}
+ my $mpi = "$d/ALL.git/objects/pack/multi-pack-index";
+ SKIP: {
+ skip 'git too old for for multi-pack-index', 2 if !-f $mpi;
+ unlink glob("$d/ALL.git/objects/pack/*");
+ ok run_script([qw(-extindex --all -L medium -j3
+ --no-multi-pack-index), $d]),
+ 'test --no-multi-pack-index';
+ ok !-f $mpi, '--no-multi-pack-index respected';
+ }
}
test_lei(sub {