From 69b5ab18a594fa434d79cacee35c4d9a0df7b55c Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 24 Sep 2021 10:56:41 +0000 Subject: clone|--mirror: support --epoch=RANGE for partial clones Partial (v2) clones should be useful addition for users wanting to conserve storage while having fast access to recent messages. Continuing work started in 876e74283ff3 (fetch: ignore non-writable epoch dirs, 2021-09-17), this creates bare, read-only epoch git repos. These git repos have the remotes pre-configured, but does not fetch any objects. The goal is to allow users to set the writable bit on a previously-skipped epoch and start fetching it. Shell completion support may not be necessary given how short the epoch ranges are, here. Cc: Luis Chamberlain Link: https://public-inbox.org/meta/20210917002204.GA13112@dcvr/T/#u --- script/public-inbox-clone | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'script') diff --git a/script/public-inbox-clone b/script/public-inbox-clone index 0efde1a8..54059d03 100755 --- a/script/public-inbox-clone +++ b/script/public-inbox-clone @@ -13,6 +13,7 @@ usage: public-inbox-clone INBOX_URL [DESTINATION] options: + --epoch=RANGE range of v2 epochs to clone (e.g `2..5', `~0', `~1..') --torsocks VAL whether or not to wrap git and curl commands with torsocks (default: `auto') Must be one of: `auto', `no' or `yes' @@ -21,7 +22,7 @@ options: -C DIR chdir to specified directory EOF GetOptions($opt, qw(help|h quiet|q verbose|v+ C=s@ c=s@ - no-torsocks torsocks=s)) or die $help; + no-torsocks torsocks=s epoch=s)) or die $help; if ($opt->{help}) { print $help; exit }; require PublicInbox::Admin; # loads Config PublicInbox::Admin::do_chdir(delete $opt->{C}); -- cgit v1.2.3-24-ge0c7