Re: "git check-attr" lists macros as being "set" -- feature or bug?

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

 



On 07/26/2011 09:43 PM, Junio C Hamano wrote:
> Jeff King <peff@xxxxxxxx> 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@xxxxxxxxxxxx
http://softwareswirl.blogspot.com/
--
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]