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 <grubba@grubba.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Henrik Grubbström 2010-04-06 14:46:42 +02:00 коммит произвёл Junio C Hamano
Родитель 7fb0eaa289
Коммит 426c27b7c0
1 изменённых файлов: 3 добавлений и 1 удалений

4
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--;
}