From: Michael Haggerty Date: Wed, 03 Aug 2011 13:19:39 GMT Subject: Re: "git check-attr" lists macros as being "set" -- feature or bug? Message-ID: <4E394AEB.7020006@alum.mit.edu> In-Reply-To: <7vvcuoq13i.fsf@alter.siamese.dyndns.org> On 07/26/2011 09:43 PM, Junio C Hamano wrote: > Jeff King writes: >> I don't know the original rationale, but it seems like the only sane >> behavior to me. I agree that the behavior is sane (and also convenient). > When we say "check-attr tells you if the named attribute is set", do we > say "but macros cannot be examined this way" in the documentation? If > not, I do not think we need any cluttering update. I was confused by the following things: * The word "macro" in other contexts (e.g., C macros) typically refers to something that is fully replaced by its substitution text, leaving no trace of the original macro or its name. * In gitattributes(5), the following misleading text: > ------------ > *.jpg -text -diff > ------------ > > but that may become cumbersome, when you have many attributes. Using > attribute macros, you can specify groups of attributes set or unset at > the same time. The system knows a built-in attribute macro, `binary`: > > ------------ > *.jpg binary > ------------ > > which is equivalent to the above. It is *not* equivalent to the above, rather it is equivalent to *.jpg binary -text -diff (neglecting, of course, the recursive expansion of "binary"). I will soon send a documentation patch. > It is a separate issue if macros should also be listed as the new feature > that lists all attributes given to a path. I tend to think the macro > attributes as well as the other attributes they set should all be shown. I agree. Michael -- Michael Haggerty mhagger@alum.mit.edu http://softwareswirl.blogspot.com/