Browse Source

gitattributes: Clarify discussion of attribute macros

In particular, make it clear that attribute macros are themselves
recorded as attributes in addition to setting other attributes.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Michael Haggerty 14 years ago committed by Junio C Hamano
parent
commit
98e8406632
  1. 13
      Documentation/gitattributes.txt

13
Documentation/gitattributes.txt

@ -879,16 +879,19 @@ produced for, any binary file you track. You would need to specify e.g.
------------ ------------


but that may become cumbersome, when you have many attributes. Using but that may become cumbersome, when you have many attributes. Using
attribute macros, you can specify groups of attributes set or unset at attribute macros, you can define an attribute that, when set, also
the same time. The system knows a built-in attribute macro, `binary`: sets or unsets a number of other attributes at the same time. The
system knows a built-in attribute macro, `binary`:


------------ ------------
*.jpg binary *.jpg binary
------------ ------------


which is equivalent to the above. Note that the attribute macros can only Setting the "binary" attribute also unsets the "text" and "diff"
be "Set" (see the above example that sets "binary" macro as if it were an attributes as above. Note that attribute macros can only be "Set",
ordinary attribute --- setting it in turn unsets "text" and "diff"). though setting one might have the effect of setting or unsetting other
attributes or even returning other attributes to the "Unspecified"
state.




DEFINING ATTRIBUTE MACROS DEFINING ATTRIBUTE MACROS

Loading…
Cancel
Save