Document struct match_attr
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Michael Haggerty committed
Aug 12, 2011 at 23:43 UTC
ba845b755078a043312119609c1ddd7406b20979
1 file changed
+14
attr.c
+14
@@ -113,6 +113,20 @@ struct attr_state {
113
const char *setto;
114
};
115
116
+/*
117
+ * One rule, as from a .gitattributes file.
118
+ *
119
+ * If is_macro is true, then u.attr is a pointer to the git_attr being
120
+ * defined.
121
+ *
122
+ * If is_macro is false, then u.pattern points at the filename pattern
123
+ * to which the rule applies. (The memory pointed to is part of the
124
+ * memory block allocated for the match_attr instance.)
125
+ *
126
+ * In either case, num_attr is the number of attributes affected by
127
+ * this rule, and state is an array listing them. The attributes are
128
+ * listed as they appear in the file (macros unexpanded).
129
+ */
130
struct match_attr {
131
union {
132
char *pattern;