about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--Documentation/public-inbox-clone.pod12
-rw-r--r--lib/PublicInbox/LeiMirror.pm3
2 files changed, 14 insertions, 1 deletions
diff --git a/Documentation/public-inbox-clone.pod b/Documentation/public-inbox-clone.pod
index 1c31fbb3..cee9f76e 100644
--- a/Documentation/public-inbox-clone.pod
+++ b/Documentation/public-inbox-clone.pod
@@ -6,6 +6,8 @@ public-inbox-clone - "git clone --mirror" wrapper
 
 public-inbox-clone INBOX_URL [INBOX_DIR]
 
+public-inbox-clone ROOT_URL [DESTINATION]
+
 =head1 DESCRIPTION
 
 public-inbox-clone is a wrapper around C<git clone --mirror> for
@@ -82,6 +84,16 @@ Force a remote public-inbox version (must be C<1> or C<2>).
 This is auto-detected by default, and this option exists mainly
 for testing.
 
+=item --objstore[=DIR]
+
+Enables space savings when the remote C<manifest.js.gz>
+includes C<forkgroup> entries as generated by grokmirror 2.x.
+
+If C<DIR> is not an absolute path, it is relative to the
+C<DESTINATION> directory.  If only C<--objstore> is specified
+without C<DIR>, then C<objstore> (C<$DESTINATION/objstore>)
+is the implied value of C<DIR>.
+
 =item -n
 
 =item --dry-run
diff --git a/lib/PublicInbox/LeiMirror.pm b/lib/PublicInbox/LeiMirror.pm
index 6efe23fa..2f96058a 100644
--- a/lib/PublicInbox/LeiMirror.pm
+++ b/lib/PublicInbox/LeiMirror.pm
@@ -882,7 +882,8 @@ sub do_mirror { # via wq_io_do or public-inbox-clone
 
                 if (defined(my $os = $lei->{opt}->{objstore})) {
                         $os = 'objstore' if $os eq ''; # --objstore w/o args
-                        $self->{-objstore} = "$self->{dst}/$os";
+                        $os = "$self->{dst}/$os" if $os !~ m!\A/!;
+                        $self->{-objstore} = $os;
                 }
                 local $LIVE;
                 my $iv = $lei->{opt}->{'inbox-version'} //