Suppress spurious warnings in --dry-run mode
authorZygo Blaxell <zblaxell@waya.furryterror.org>
Sat, 9 Jan 2010 04:26:24 +0000 (23:26 -0500)
committerZygo Blaxell <zblaxell@waya.furryterror.org>
Sat, 9 Jan 2010 04:26:24 +0000 (23:26 -0500)
In --dry-run mode, the filesystem inodes intentionally do not change even
though links are "successful", so don't emit warnings when they haven't.

faster-dupemerge

index 714d47404d193cdbbf8480e84cb68c00e6ea8d9b..fe23f8e70619443a8cc6fb3637dc6c07354b6ba5 100755 (executable)
@@ -541,7 +541,7 @@ candidate_file:
 
                                                                        if ($link_done) {
                                                                                delete $inode_to_file_name{$to_inode}->{$to_file};
-                                                                               $inode_to_file_name{$from_inode}->{$to_file} = undef;
+                                                                               $inode_to_file_name{$from_inode}->{$to_file} = undef unless ($dry_run);
                                                                                $hash_to_inode{$digest} = [ $from_inode ];
 
                                                                                $hard_links++;