]> Sergey Matveev's repositories - public-inbox.git/commitdiff
import: run "git gc --auto" when done
authorEric Wong <e@80x24.org>
Thu, 8 Sep 2016 22:42:42 +0000 (22:42 +0000)
committerEric Wong <e@80x24.org>
Thu, 8 Sep 2016 22:42:42 +0000 (22:42 +0000)
We need to prevent excessive repository growth for
public-inbox-watch and public-inbox-mda users.

lib/PublicInbox/Import.pm

index 083fb1bc220949488820e3cbec79fed1b54e53c8..611f7b1609bdcd554f2b81bae1901c279427495c 100644 (file)
@@ -240,6 +240,7 @@ sub done {
                        my $s = PublicInbox::SearchIdx->new($inbox);
                        $s->index_sync({ ref => $self->{ref} });
                };
+               run_die([@cmd, qw(gc --auto)], undef);
        }
 
        my $lockfh = delete $self->{lockfh} or die "BUG: not locked: $!";