Path: utzoo!utgpu!watmath!uunet!tut.cis.ohio-state.edu!SM.UNISYS.COM!eggert From: eggert@SM.UNISYS.COM (Paul Eggert) Newsgroups: gnu.utils.bug Subject: 'diff -rs' should not report identical subtrees to be "files" Message-ID: <8811052021.AA15667@poi.sm.unisys.com> Date: 5 Nov 88 20:21:44 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 30 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);