From: René Scharfe Date: Fri, 17 Apr 2009 22:18:01 GMT Subject: [PATCH v2 3/5] unpack-trees: do not muck with attributes when we are not checking out Message-ID: <49E90019.9030606@lsrfire.ath.cx> In-Reply-To: <1239848917-14399-1-git-send-email-gitster@pobox.com> From: Junio C Hamano Signed-off-by: Junio C Hamano --- unpack-trees.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/unpack-trees.c b/unpack-trees.c index 6847c2d..e4eb8fa 100644 --- a/unpack-trees.c +++ b/unpack-trees.c @@ -87,7 +87,8 @@ static int check_updates(struct unpack_trees_options *o) cnt = 0; } - git_attr_set_direction(GIT_ATTR_CHECKOUT, &o->result); + if (o->update) + git_attr_set_direction(GIT_ATTR_CHECKOUT, &o->result); for (i = 0; i < index->cache_nr; i++) { struct cache_entry *ce = index->cache[i]; @@ -112,7 +113,8 @@ static int check_updates(struct unpack_trees_options *o) } } stop_progress(&progress); - git_attr_set_direction(GIT_ATTR_CHECKIN, NULL); + if (o->update) + git_attr_set_direction(GIT_ATTR_CHECKIN, NULL); return errs != 0; } -- 1.6.3.rc0