bug-diffutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-diffutils] bug#26052: Feature suggestion: Identifying identical fil


From: Victor Porton
Subject: [bug-diffutils] bug#26052: Feature suggestion: Identifying identical files
Date: Fri, 10 Mar 2017 20:01:43 +0200

Let we have N files (or directories).

I want to split this N-element set into a partition (and display this
partition to the user) by "being identical" equivalence relation.

Note that being identical may sometimes be relaxed, for example the
amount of whitespace may not matter.

This utility would be useful for refactoring (restructuring) code when
several functions or modules are merged together, to find which code is
identical and which is not.

Concerning implementation: For strict equality (without relaxing it to
ignore whitespace or like this), it can be efficiently implemented
using hashes. For relaxed utility, `diff` needs to be invoked. Well,
sometimes relaxed equality can be also done with hashes: For example,
replace all sequences of spaces with one space before calculating the
hash.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]