$git->cleanup;
$mm_tmp->atfork_prepare;
$self->done; # release lock
+
+ # TODO: print progress info, here
+
# allow -watch or -mda to write...
$self->idx_init; # reacquire lock
$mm_tmp->atfork_parent;
sub index_prepare {
my ($self, $opts, $epoch_max, $ranges) = @_;
+ my $pr = $opts->{-progress};
my $regen_max = 0;
my $head = $self->{-inbox}->{ref_head} || 'refs/heads/master';
for (my $i = $epoch_max; $i >= 0; $i--) {
$ranges->[$i] = $range;
# can't use 'rev-list --count' if we use --diff-filter
+ $pr->("$i.git counting changes\n\t$range ... ") if $pr;
+ my $n = 0;
my $fh = $git->popen(qw(log --pretty=tformat:%H
--no-notes --no-color --no-renames
--diff-filter=AM), $range, '--', 'm');
- ++$regen_max while <$fh>;
+ ++$n while <$fh>;
+ $pr->("$n\n") if $pr;
+ $regen_max += $n;
}
\$regen_max;
}
--no-notes --no-color --no-abbrev --no-renames);
# work backwards through history
- my $last_commit = [];
for (my $i = $epoch_max; $i >= 0; $i--) {
my $git_dir = git_dir_n($self, $i);
die "already reindexing!\n" if delete $self->{reindex_pipe};