Skip to content

Commit 426c27b

Browse files
grubbagitster
authored andcommitted
attr: Fixed debug output for macro expansion.
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 7fb0eaa commit 426c27b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

attr.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,9 @@ static int fill_one(const char *what, struct match_attr *a, int rem)
605605
const char *v = a->state[i].setto;
606606

607607
if (*n == ATTR__UNKNOWN) {
608-
debug_set(what, a->u.pattern, attr, v);
608+
debug_set(what,
609+
a->is_macro ? a->u.attr->name : a->u.pattern,
610+
attr, v);
609611
*n = v;
610612
rem--;
611613
}

0 commit comments

Comments
 (0)