Skip to content

Commit

Permalink
attr: Fixed debug output for macro expansion.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Henrik Grubbström authored and Junio C Hamano committed Apr 11, 2010
1 parent 7fb0eaa commit 426c27b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion attr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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--;
}
Expand Down

0 comments on commit 426c27b

Please sign in to comment.