Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[bug-diffutils] - Directories compare doesn't show all differences

0 views
Skip to first unread message

wasser mai

unread,
Oct 11, 2017, 4:55:31 PM10/11/17
to bug-gn...@gnu.org
Description of problem:
Directories compare with --brief doesn't show all differencies

Version-Release number of selected component (if applicable):
3.6

How reproducible:
always

Steps to Reproduce:
1. create 2 directories dir1 and dir2
2. in dir1 create README file
3. in dir2 create README directory
4. in dir2/README directory create some files - readme1.txt readme2.txt
5. do diff -r --brief dir1/ dir2/

Actual results:
file dir1/README is a regular file while file dir2/README is a directory

Information about files in dir2/README in compare to dir1 is not
present - also difference

Expected results:
Show all difference as expected

Jim Meyering

unread,
Oct 15, 2017, 12:40:02 PM10/15/17
to wasser mai, bug-gn...@gnu.org, bug-di...@gnu.org
Thank you for the report, but what you are seeing is the intended
behavior. What if diff (with or without --brief) were to print even
just the names of all files under your README directory, recursively?

Consider what this invocation of diff should print:

touch /tmp/usr && diff -r /tmp/usr /

Currently, it prints only this:

File /tmp/usr is a regular empty file while file /usr is a directory

while with your suggestion, it would print something for each of the
many files under /usr.
[I've Cc'd the bug-diffutils mailing list, per instructions at the
bottom of "diff --help" output]

0 new messages