Re: [PATCH 3/3] Teach 'diff' about 'nodiff' attribute.

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

 



On Friday 2007, April 13, Johannes Sixt wrote:

> Yet in Junio's introductory message, the example was
>
>         *       crlf !nodiff
>
> and it made me think: huh? And then again: huh?
>
> I don't mind if you call me dumb now, but even an intelligent person

Wouldn't dream of it.

> will have to think a second or two about the meaning. That's plainly
> not necessary. In particular, where there can be no difference
> between "diff" and "!nodiff".

As I said, I wouldn't like to make the call.

I understand your point - however I think I understand why Junio chose 
nodiff as the attribute.  I would imagine that git /wants/ to show a 
textual diff for everything as its default.  In that case, the 
attribute that you would assign to the least number of files 
is "nodiff".  Mostly you want diffs, so the attribute implemented is 
for the special case and is "nodiff".

If I've understood the attributes system correctly, it's worth bearing 
in mind that "!diff" is not the same as "nodiff".  The not in "!diff" 
means "supress the attribute diff", not as you would traditionally 
imagine "not-diff".  In this case it doesn't matter because there are 
only two possibilities for the diff engine - show the diff or don't.  
However, more attributes might get added that aren't so simple.

Junio - This makes me think that perhaps "!" is not the right symbol for 
this - that's going to get read by programmers everywhere as NOT, 
rather than suppress.  Perhaps it doesn't matter, I might be 
over-thinking this.



Andy

-- 
Dr Andy Parkins, M Eng (hons), MIET
andyparkins@xxxxxxxxx
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]