diff options
author | David Golden <dagolden@cpan.org> | 2011-06-10 11:53:16 -0400 |
---|---|---|
committer | David Golden <dagolden@cpan.org> | 2011-06-10 14:02:43 -0400 |
commit | e67bd9d27a537b59af930ff5814f5b4e57008f61 (patch) | |
tree | 53cbc0e3ac7ce055f1d25b3d8bbfc564dca1debb /Porting | |
parent | 55108fc8754e2bc60bfcce2f4c6389f06cbe6f53 (diff) | |
download | perl-e67bd9d27a537b59af930ff5814f5b4e57008f61.tar.gz |
git-deltatool: show progress only for interactive modes
Diffstat (limited to 'Porting')
-rw-r--r-- | Porting/git-deltatool | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Porting/git-deltatool b/Porting/git-deltatool index 1223d4d67c..1458989299 100644 --- a/Porting/git-deltatool +++ b/Porting/git-deltatool @@ -92,7 +92,8 @@ sub assign { my @choices = ( $self->section_choices, $self->action_choices ); $self->_iterate_commits( sub { - my $log = shift; + my ($log, $i, $count) = @_; + say "\n### Commit @{[$i+1]} of $count ###"; say "-" x 75; $self->show_header($log); $self->show_body($log, 1); @@ -108,7 +109,8 @@ sub review { my @choices = ( $self->review_choices, $self->action_choices ); $self->_iterate_commits( sub { - my $log = shift; + my ($log, $i, $count) = @_; + say "\n### Commit @{[$i+1]} of $count ###"; say "-" x 75; $self->show_header($log); $self->show_notes($log, 1); @@ -179,8 +181,7 @@ sub _iterate_commits { my $list = [ $self->find_commits($type) ]; my $count = @$list; while ( my ($i,$log) = each @$list ) { - say "\n### Commit @{[$i+1]} of $count ###"; - redo unless $fcn->($log); + redo unless $fcn->($log, $i, $count); } return 1; } |