]> Sergey Matveev's repositories - public-inbox.git/commitdiff
import: stop writing legacy ssoma.index by default
authorEric Wong (Contractor, The Linux Foundation) <e@80x24.org>
Thu, 8 Feb 2018 17:21:36 +0000 (17:21 +0000)
committerEric Wong (Contractor, The Linux Foundation) <e@80x24.org>
Thu, 8 Feb 2018 17:21:36 +0000 (17:21 +0000)
For machines which have never seen ssoma, they don't need the
index so stop creating it.

lib/PublicInbox/Import.pm

index 8eec17eb852560af14d90e1dc6b6a7f7f11f89d9..299329b4ee6ed5503f4d08eb92014bba9ba9f3c8 100644 (file)
@@ -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);
        }