bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: diff -r option to ignore missing files


From: Charles Levert
Subject: Re: diff -r option to ignore missing files
Date: Thu, 17 Nov 2005 15:32:16 -0500
User-agent: Mutt/1.4.1i

* On Thursday 2005-11-17 at 13:13:33 -0500, Chuck Swiger wrote:
> 
> At least part of what you're asking for is available via:
> 
>   -P     When comparing directories, if a file appears only in the second
>          directory of the two, treat it  as  present  but  empty  in  the
>          other.

Just a note on the documentation.  This doesn't
address the subject of the ongoing thread.

   -- The man page documents both -P and --unidirectional-new-file.

   -- The info manual only documents --unidirectional-new-file, but not -P.

   -- The --help output only documents --unidirectional-new-file, but not -P.


About the subject of the thread.  Each of
the various types of output lines is uniquely
and unambiguously distinguishable by its first
few characters.  The task at hand can easily be
accomplished by using:

   diff -purd dir1 dir2 | grep -v '^Only'

Is a new option that does the same really necessary?

(Well, for the unambiguous part, not quite.
 Under -u, a "---" line taken in isolation cannot
 be told apart from a "-" line that applies to
 content that starts with "--"; ditto for "+++"
 and "+"/"++".  Only their relative position in
 the whole output can help tell them apart.)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]