Code

attr: Fixed debug output for macro expansion.
authorHenrik Grubbström <grubba@grubba.org>
Tue, 6 Apr 2010 12:46:42 +0000 (14:46 +0200)
committerJunio C Hamano <gitster@pobox.com>
Sun, 11 Apr 2010 01:35:59 +0000 (18:35 -0700)
When debug_set() was called during macro expansion, it
received a pointer to a struct git_attr rather than a
string.

Signed-off-by: Henrik Grubbström <grubba@grubba.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
attr.c

diff --git a/attr.c b/attr.c
index f5346ed32a1b5caf908021805214fd97e033eb27..7dc17b95056139dced5b4799d5c013fafce5d091 100644 (file)
--- a/attr.c
+++ b/attr.c
@@ -605,7 +605,9 @@ static int fill_one(const char *what, struct match_attr *a, int rem)
                const char *v = a->state[i].setto;
 
                if (*n == ATTR__UNKNOWN) {
-                       debug_set(what, a->u.pattern, attr, v);
+                       debug_set(what,
+                                 a->is_macro ? a->u.attr->name : a->u.pattern,
+                                 attr, v);
                        *n = v;
                        rem--;
                }