repositories matching the given wildcard pattern. Supports the same
wildcards as L</--include>
+=item --inbox-config=always|v2|v1|never
+
+Whether or not to retrieve the C<$INBOX/_/text/config/raw> HTTP(S)
+endpoint when cloning.
+
+Since we can't deduce v1 inboxes from code repositories, setting this
+to C<v2> or C<never> can allow faster clones of code repositories if
+no v1 inboxes are present.
+
+Default: C<always>
+
=item -n
=item --dry-run
push @$cmd, '--reference', "$self->{dst}$ref";
start_clone($self, $cmd, $opt, $fini);
- _get_txt_start($self, '_/text/config/raw', $fini);
+ $lei->{opt}->{'inbox-config'} =~ /\A(?:always|v1)\z/s and
+ _get_txt_start($self, '_/text/config/raw', $fini);
my $d = $self->{-ent} ? $self->{-ent}->{description} : undef;
defined($d) ? ($self->{'txt.description'} = $d) :
_get_txt_start($self, 'description', $fini);
my $lk = bless { lock_path => "$dst/inbox.lock" }, 'PublicInbox::Lock';
my $fini = PublicInbox::OnDestroy->new($$, \&v2_done, $task);
- _get_txt_start($task, '_/text/config/raw', $fini);
+ $lei->{opt}->{'inbox-config'} =~ /\A(?:always|v2)\z/s and
+ _get_txt_start($task, '_/text/config/raw', $fini);
+
_get_txt_start($self, 'description', $fini);
$task->{-locked} = $lk->lock_for_scope($$) if !$self->{dry_run};
die "TODO: non-HTTP/HTTPS clone of $self->{src} not supported, yet";
}
-sub do_mirror { # via wq_io_do
+sub do_mirror { # via wq_io_do or public-inbox-clone
my ($self) = @_;
my $lei = $self->{lei};
umask($lei->{client_umask}) if defined $lei->{client_umask};
eval {
+ my $ic = $lei->{opt}->{'inbox-config'} //= 'always';
+ $ic =~ /\A(?:v1|v2|always|never)\z/s or die <<"";
+--inbox-config must be one of `always', `v2', `v1', or `never'
+
my $iv = $lei->{opt}->{'inbox-version'};
if (defined $iv) {
local $LIVE;