Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

-c -T -R, leaks, malloc checks #8

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

marcin-gryszkalis
Copy link

several changes included, unfortunately with old indent (happy to see you switching to 4-spaces).

I don't know is use-case for -c is clear (I'm trying to make an example for man-page, I not commited yet though). I have a script similar to join-duplicates.sh (in perl) but using this -c mode - before I had problems with case with two (or more) groups or hardlinks, eg. 5 file entries, all the same content, hardlinked in groups like:
inode / name:
100 / a.txt
100 / b.txt
200 / c.txt
200 / d.txt
200 / e.txt
and with -p mode duff reported duplicate group of
a.txt
c.txt

  • after merge I had
    100 / a.txt
    100 / b.txt
    100 / c.txt
    200 / d.txt
    200 / e.txt

in next run it was not impossible to get from duff -p following list:
d.txt
a.txt
and after merge I had
200 / a.txt
100 / b.txt
100 / c.txt
200 / d.txt
200 / e.txt

and so on... never ending story.
Alternatively I could run duff without -p but it causes reporting all the properly hardlinked groups - not fun either. So -c fixes the case :)

I'll try to update the man page during weekend. Feel free to ask about the changes I made - I'd love to see them in duff ;)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant