projects
/
dupemerge
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d53bd50
)
dupemerge: make sure 'sort -znr' still considers dev/inode numeric
author
Zygo Blaxell
<zblaxell@faye.furryterror.org>
Wed, 6 Jan 2010 17:23:28 +0000
(12:23 -0500)
committer
Zygo Blaxell
<zblaxell@waya.furryterror.org>
Sat, 9 Jan 2010 02:22:03 +0000
(21:22 -0500)
faster-dupemerge
patch
|
blob
|
history
diff --git
a/faster-dupemerge
b/faster-dupemerge
index 5028ca8df29cd94690482378926b56f72a307776..4ad0176ea3dfcddddc95fa685aa8c2c9ef63d0f6 100755
(executable)
--- a/
faster-dupemerge
+++ b/
faster-dupemerge
@@
-238,7
+238,7
@@
my @find_command = ('find', @directories, @extra_find_opts, '-type', 'f');
my $printf_string = '%s ' .
($collapse_access ? '0 0 0 ' : '%U %G %m ') .
($collapse_timestamp ? '0 ' : '%T@ ') .
my $printf_string = '%s ' .
($collapse_access ? '0 0 0 ' : '%U %G %m ') .
($collapse_timestamp ? '0 ' : '%T@ ') .
- '%D
:
%i %p\0';
+ '%D
%i %p\0';
push(@find_command, '!', '-empty') unless $collapse_zero;
push(@find_command, '-printf', $printf_string);
push(@find_command, '!', '-empty') unless $collapse_zero;
push(@find_command, '-printf', $printf_string);
@@
-543,9
+543,10
@@
end_merge:
}
while (<FIND>) {
}
while (<FIND>) {
- my ($weak_key, $dev, $ino, $name) = m/^(\d+ \d+ \d+ \d+ -?[\d.]+) (\d+)
:
(\d+) (.+)\0$/so;
+ my ($weak_key, $dev, $ino, $name) = m/^(\d+ \d+ \d+ \d+ -?[\d.]+) (\d+)
(\d+) (.+)\0$/so;
die "read error: $!\nLast input line was '$_'" unless defined($name);
die "read error: $!\nLast input line was '$_'" unless defined($name);
+ # 64 bits out to be enough for everybody!
my $inode = sprintf('%016x:%016x', $dev, $ino);
print STDERR "weak_key=$weak_key inode=$inode name=$name\n" if $debug;
my $inode = sprintf('%016x:%016x', $dev, $ino);
print STDERR "weak_key=$weak_key inode=$inode name=$name\n" if $debug;