From 969f9d73228f233aff071a0d07ba28afdb79dbc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m?= Date: Tue, 6 Apr 2010 14:46:43 +0200 Subject: attr: Allow multiple changes to an attribute on the same line. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When using macros it isn't inconceivable to have an attribute being set by a macro, and then being reset explicitly. Signed-off-by: Henrik Grubbström Signed-off-by: Junio C Hamano --- attr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'attr.c') diff --git a/attr.c b/attr.c index 7dc17b9505..53cf07e913 100644 --- a/attr.c +++ b/attr.c @@ -599,7 +599,7 @@ static int fill_one(const char *what, struct match_attr *a, int rem) struct git_attr_check *check = check_all_attr; int i; - for (i = 0; 0 < rem && i < a->num_attr; i++) { + for (i = a->num_attr - 1; 0 < rem && 0 <= i; i--) { struct git_attr *attr = a->state[i].attr; const char **n = &(check[attr->attr_nr].value); const char *v = a->state[i].setto; -- cgit v1.2.3