Skip to content

Commit 98e8406

Browse files
mhaggergitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3503b8d commit 98e8406

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

Documentation/gitattributes.txt

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -879,16 +879,19 @@ produced for, any binary file you track. You would need to specify e.g.
879879
------------
880880

881881
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`:
884885

885886
------------
886887
*.jpg binary
887888
------------
888889

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.
892895

893896

894897
DEFINING ATTRIBUTE MACROS

0 commit comments

Comments
 (0)