bug-diffutils
[Top][All Lists]
Advanced

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

[bug-diffutils] Re: New diff options/features


From: Duncan Moore
Subject: [bug-diffutils] Re: New diff options/features
Date: Sat, 02 Oct 2010 13:33:37 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.9) Gecko/20100915 Thunderbird/3.1.4



On 02/10/2010 11:05, Andreas Schwab wrote:
Duncan Moore<address@hidden>  writes:

On 26/09/2010 21:07, Paul Eggert wrote:
On 09/26/2010 07:56 AM, Duncan Moore wrote:
2) --if-different
     File contents are assumed identical if the files have the same size
and timestamp.
This makes sense, but the option name is poorly chosen.  How about
--assume-same?
I was unhappy with the name too. I think --assume-same is better, but it
doesn't convey the fact that it is conditional (on the timestamp and size
being the same). But I'm happy to go with it, unless someone thinks of
something better.
How about --compare-attributes=size,mtime?

     --compare-attributes=ATTRS
         Compare file attributes ATTRS and assume two files are identical
         if those attributes match, disregarding the actual file contents.

The name --compare-attributes=... shows what the command is conditional on, but not the consequence - i.e. that the contents might not be compared. Something like --assume-contents-same-if-attributes-same=... would be fully specific, but is far too long. I think there's probably no short name that succinctly conveys all this.

Also, I think the name --compare-attributes=... may lead to confusion with the --compare=... option, http://www.mail-archive.com/address@hidden/msg00096.html, which I'm also working on. This option compares and reports other file properties that differ, in addition to, or instead of, file contents.

With regards to listing the file attributes to use with --assume-same, I wouldn't have thought that anything other than time and size would be too useful, which was why I've not used an attribute list. As Paul said, this could be changed in the future if it was felt necessary.

So at this stage I'm still inclined to go with --assume-same, with no attribute list.



reply via email to

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