We don't require every git epoch to exist since we support
the --skip feature in public-inbox-init.
my $pfx = "$self->{-inbox}->{mainrepo}/git";
my $purges = [];
foreach my $i (0..$self->{epoch_max}) {
- my $git = PublicInbox::Git->new("$pfx/$i.git");
+ my $git_dir = "$pfx/$i.git";
+ -d $git_dir or next;
+ my $git = PublicInbox::Git->new($git_dir);
my $im = $self->import_init($git, 0, 1);
$purges->[$i] = $im->purge_oids($purge);
}