Thread View: gnu.utils.bug
1 messages
1 total messages
Started by Paul Eggert
Sat, 05 Nov 1988 20:21
'diff -rs' should not report identical subtrees to be "files"
Author: Paul Eggert
Date: Sat, 05 Nov 1988 20:21
Date: Sat, 05 Nov 1988 20:21
30 lines
1203 bytes
1203 bytes
GNU diff 1.4 exhibits the following behavior (under SunOS 4.0 on a Sun-3/60):
% mkdir a b
% touch a/f b/f
% diff -rs a b
Files a/f and b/f are identical
Files a and b are identical
The second message is wrong, because `a' and `b' are not regular files.
Here is a fix.
*** diff1.4/diff.c Sat Nov 5 12:15:57 1988
--- diffnew/diff.c Sat Nov 5 12:14:54 1988
***************
*** 537,543 ****
close (inf[1].desc);
done:
! if (val == 0 && print_file_same_flag)
message ("Files %s and %s are identical\n",
inf[0].name, inf[1].name);
--- 537,543 ----
close (inf[1].desc);
done:
! if (val == 0 && print_file_same_flag && !inf[0].dir_p)
message ("Files %s and %s are identical\n",
inf[0].name, inf[1].name);
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads