home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!paladin.american.edu!darwin.sura.net!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!cbnewsc!cbfsb!att-out!rutgers!cmcl2!panix!spencer
- From: spencer@panix.com (David Spencer)
- Newsgroups: comp.unix.aux
- Subject: directory diff broken?
- Message-ID: <1992Sep9.131546.20638@panix.com>
- Date: 9 Sep 92 13:15:46 GMT
- Organization: PANIX Public Access Unix, NYC
- Lines: 63
-
- If I diff two directories, diff will stop after the first file that
- differs from its counterpart, rather than diffing each file against
- its counterpart. E.g.
-
- $ mkdir fgrep
- $ cp /usr/local/src/fgrep/* fgrep
- $ cd fgrep
- $ ls -C
- Makefile fgrep.c kwset.h obstack.h std.h
- README kwset.c obstack.c std.c unix.h
- $ for i in *.c; do echo "test $i">>$i; done
- $ diff . /usr/local/src/fgrep
- diff ./fgrep.c /usr/local/src/fgrep/fgrep.c
- 628d627
- < test fgrep.c
-
- [What about kwset.c, obstack.c and std.c?]
-
- On the other hand, diff -c works:
-
- $ diff -c . /usr/local/src/fgrep
- diff -c ./fgrep.c /usr/local/src/fgrep/fgrep.c
- *** ./fgrep.c Wed Sep 9 08:19:36 1992
- --- /usr/local/src/fgrep/fgrep.c Wed Mar 7 12:33:53 1990
- ***************
- *** 625,628
-
- exit(error_seen ? 2 : status);
- }
- - test fgrep.c
-
- --- 625,627 -----
-
- exit(error_seen ? 2 : status);
- }
- diff -c ./kwset.c /usr/local/src/fgrep/kwset.c
- *** ./kwset.c Wed Sep 9 08:19:36 1992
- --- /usr/local/src/fgrep/kwset.c Wed Mar 7 12:29:13 1990
- ***************
- *** 607,610
- obstack_free(&kwset->obstack, (PTR) NULL);
- free((PTR) kws);
- }
- - test kwset.c
-
- --- 607,609 -----
- obstack_free(&kwset->obstack, (PTR) NULL);
- free((PTR) kws);
- }
- [differences in obstack.c and std.c omitted]
-
- On large directories, diff -c sometimes quits after a few files. On
- directories with subdirectories, diff -r (with or without -c) will
- often stop printing after a few files, but not return. ps reveals
- several children.
-
- I get the same results on my machine at home and on panix. It's not a
- practical problem; Gnu diff works fine. I can also work around it by
- using find to call diff on each file-pair.
-
- Anybody else noticed this?
-
- dhs spencer@panix.com
-