command line switch to disable following symlink in DIFF program

Jin Guojun [VFFS] jinmtb at sbcglobal.net
Mon Dec 12 16:16:42 PST 2005


Is "diff" program supposed to have a switch at command line to disable 
following
(ignore) symbolic links when -r switch is given, like many other 
programs do?

In many places, a directory or source file can be symbolically linked 
multiple times to
different archives. Since the original source will be diffed anyway, why 
"diff" needs to
follow symlinks to compare a same source multiple times?

In the other case, if partition A has a symlink to somewhere in 
partition B, which has
a symlink back to partition A , then "diff -r" will loop forever.

I think that "diff" need a switch to disable following symlink to 
compare final object,
instead, just check if symlink exists in both checked directories, like 
ls -P.

    -Jin


More information about the freebsd-hackers mailing list