From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: 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.0 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 3A6591FAE5 for ; Thu, 15 Feb 2018 11:08:45 +0000 (UTC) From: "Eric Wong (Contractor, The Linux Foundation)" To: meta@public-inbox.org Subject: [WIP 04/17] import: stop writing legacy ssoma.index by default Date: Thu, 15 Feb 2018 11:08:27 +0000 Message-Id: <20180215110840.30413-5-e@80x24.org> In-Reply-To: <20180215110840.30413-1-e@80x24.org> References: <20180215105509.GA22409@dcvr> <20180215110840.30413-1-e@80x24.org> List-Id: For machines which have never seen ssoma, they don't need the index so stop creating it. --- lib/PublicInbox/Import.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/PublicInbox/Import.pm b/lib/PublicInbox/Import.pm index 8eec17e..299329b 100644 --- a/lib/PublicInbox/Import.pm +++ b/lib/PublicInbox/Import.pm @@ -229,10 +229,9 @@ sub done { # for compatibility with existing ssoma installations # we can probably remove this entirely by 2020 my $git_dir = $self->{git}->{git_dir}; - # XXX: change the following scope to: if (-e $index) # in 2018 or so.. my @cmd = ('git', "--git-dir=$git_dir"); - if ($nchg && !$ENV{FAST}) { - my $index = "$git_dir/ssoma.index"; + my $index = "$git_dir/ssoma.index"; + if ($nchg && -e $index && !$ENV{FAST}) { my $env = { GIT_INDEX_FILE => $index }; run_die([@cmd, qw(read-tree -m -v -i), $self->{ref}], $env); } -- EW