Don't report size in --progress unless it changes
authorZygo Blaxell <zblaxell@waya.furryterror.org>
Sat, 9 Jan 2010 07:23:07 +0000 (02:23 -0500)
committerZygo Blaxell <zblaxell@waya.furryterror.org>
Sat, 9 Jan 2010 07:23:07 +0000 (02:23 -0500)
faster-dupemerge

index fe23f8e70619443a8cc6fb3637dc6c07354b6ba5..232c6bd3474958f8bd097187b23ec87457104a29 100755 (executable)
@@ -589,6 +589,7 @@ end_merge:
 }
 
 my $last_time = 0;
 }
 
 my $last_time = 0;
+my $last_size = 0;
 
 while (<FIND>) {
        my ($weak_key, $size, $dev, $ino, $name) = m/^((\d+) \d+ \d+ \d+ -?[\d.]+) (\d+) (\d+) (.+)\0$/so;
 
 while (<FIND>) {
        my ($weak_key, $size, $dev, $ino, $name) = m/^((\d+) \d+ \d+ \d+ -?[\d.]+) (\d+) (\d+) (.+)\0$/so;
@@ -608,8 +609,9 @@ while (<FIND>) {
 
        if ($progress) {
                my $this_time = time();
 
        if ($progress) {
                my $this_time = time();
-               if ($this_time != $last_time) {
+               if ($this_time != $last_time && $size != $last_size) {
                        $last_time = $this_time;
                        $last_time = $this_time;
+                       $last_size = $size;
                        print STDERR "($size)";
                }
        }
                        print STDERR "($size)";
                }
        }