[PATCH v4 6/8] attr: Fixed debug output for macro expansion.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?=
Date: Tuesday, April 6, 2010 - 5:46 am

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>
---
 attr.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/attr.c b/attr.c
index f5346ed..5c6464e 100644
--- 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--;
 		}
-- 
1.7.0.3.316.g33b5e

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH v4 0/8] Attribute and conversion patches, =?UTF-8?q?Henrik=20G ..., (Tue Apr 6, 5:46 am)
[PATCH v4 1/8] convert: Safer handling of $Id$ contraction., =?UTF-8?q?Henrik=20G ..., (Tue Apr 6, 5:46 am)
[PATCH v4 2/8] convert: Keep foreign $Id$ on checkout., =?UTF-8?q?Henrik=20G ..., (Tue Apr 6, 5:46 am)
[PATCH v4 3/8] status: Added missing calls to diff_unmodif ..., =?UTF-8?q?Henrik=20G ..., (Tue Apr 6, 5:46 am)
[PATCH v4 4/8] diff: Filter files that have changed only d ..., =?UTF-8?q?Henrik=20G ..., (Tue Apr 6, 5:46 am)
[PATCH v4 5/8] convert: Added core.refilteronadd feature., =?UTF-8?q?Henrik=20G ..., (Tue Apr 6, 5:46 am)
[PATCH v4 6/8] attr: Fixed debug output for macro expansion., =?UTF-8?q?Henrik=20G ..., (Tue Apr 6, 5:46 am)
[PATCH v4 7/8] attr: Allow multiple changes to an attribut ..., =?UTF-8?q?Henrik=20G ..., (Tue Apr 6, 5:46 am)
[PATCH v4 8/8] attr: Expand macros immediately when encoun ..., =?UTF-8?q?Henrik=20G ..., (Tue Apr 6, 5:46 am)
Re: [PATCH v4 3/8] status: Added missing calls to diff_unm ..., Henrik Grubbström, (Mon Apr 12, 6:00 am)
Re: [PATCH v4 4/8] diff: Filter files that have changed on ..., Henrik Grubbström, (Fri Apr 16, 8:30 am)