X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=unpack-trees.c;h=e4eb8fa3afc7ad895ba925701ee3c6881b29bd91;hb=a162e78df082d4f885bda2e51067d9788a7f65e4;hp=6847c2d966c5e1d0299b21682d6fef2637329071;hpb=2149e0f6a66cb4a5707ef6201763051d94f288af;p=git.git diff --git a/unpack-trees.c b/unpack-trees.c index 6847c2d96..e4eb8fa3a 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; }