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>
Michael Haggerty committed
Aug 3, 2011 at 15:41 UTC
98e840663251fc99055265b9bd4710e398310eb7
1 file changed
+8
-5
Documentation/gitattributes.txt
+8
-5
@@ -879,16 +879,19 @@ produced for, any binary file you track. You would need to specify e.g.
879
------------
880
881
but that may become cumbersome, when you have many attributes. Using
882
-attribute macros, you can specify groups of attributes set or unset at
883
-the same time. The system knows a built-in attribute macro, `binary`:
882
+attribute macros, you can define an attribute that, when set, also
883
+sets or unsets a number of other attributes at the same time. The
884
+system knows a built-in attribute macro, `binary`:
885
886
------------
887
*.jpg binary
888
------------
889
889
-which is equivalent to the above. Note that the attribute macros can only
890
-be "Set" (see the above example that sets "binary" macro as if it were an
891
-ordinary attribute --- setting it in turn unsets "text" and "diff").
890
+Setting the "binary" attribute also unsets the "text" and "diff"
891
+attributes as above. Note that attribute macros can only be "Set",
892
+though setting one might have the effect of setting or unsetting other
893
+attributes or even returning other attributes to the "Unspecified"
894
+state.
895
896
897
DEFINING ATTRIBUTE MACROS