Porting/git-deltatool: print progress info to STDERR
authorÆvar Arnfjörð Bjarmason <avar@cpan.org>
Tue, 15 Feb 2011 23:07:38 +0000 (23:07 +0000)
committerÆvar Arnfjörð Bjarmason <avar@cpan.org>
Tue, 15 Feb 2011 23:08:24 +0000 (23:08 +0000)
Print output that's just displaying the progress of the tool to STDERR
instead of STDOUT. I can now do things like:

    git-deltatool --mode summary --type blocking | awk '{print $1}'

And not have the first line be "Scanning".

Porting/git-deltatool

index 315cb7b..35156e8 100644 (file)
@@ -177,7 +177,7 @@ sub update {
 sub _iterate_commits {
   my ($self, $fcn) = @_;
   my $type = $self->opt('type');
-  say "Scanning for $type commits since " . $self->last_tag . "...";
+  say STDERR "Scanning for $type commits since " . $self->last_tag . "...";
   for my $log ( $self->find_commits($type) ) {
     redo unless $fcn->($log);
   }