From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 8093A1F53D for ; Mon, 10 Aug 2020 02:12:05 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 01/14] index: require --reindex when using --xapian-only Date: Mon, 10 Aug 2020 02:11:52 +0000 Message-Id: <20200810021205.18909-2-e@yhbt.net> In-Reply-To: <20200810021205.18909-1-e@yhbt.net> References: <20200810021205.18909-1-e@yhbt.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: This to avoid user error of a currently undocumented switch; since --xapian-only always goes through the full history at the moment. --- script/public-inbox-index | 3 +++ 1 file changed, 3 insertions(+) diff --git a/script/public-inbox-index b/script/public-inbox-index index 73ca2953..9e0907be 100755 --- a/script/public-inbox-index +++ b/script/public-inbox-index @@ -42,6 +42,9 @@ GetOptions($opt, qw(verbose|v+ reindex rethread compact|c+ jobs|j=i prune or die "bad command-line args\n$usage"; if ($opt->{help}) { print $help; exit 0 }; die "--jobs must be >= 0\n" if defined $opt->{jobs} && $opt->{jobs} < 0; +if ($opt->{xapianonly} && !$opt->{reindex}) { + die "--xapian-only requires --reindex\n"; +} # require lazily to speed up --help require PublicInbox::Admin;