summaryrefslogtreecommitdiff
path: root/unpack-trees.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2009-04-18 14:46:08 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-04-18 14:46:08 -0700
commit5758b25da43c401cad33f3304f78084a0305d21c (patch)
treee10e86da5fd7b1c0f13306e289a065bae336e38e /unpack-trees.c
parentMerge branch 'maint' (diff)
parentarchive test: attributes (diff)
downloadtgif-5758b25da43c401cad33f3304f78084a0305d21c.tar.xz
Merge branch 'nd/archive-attribute'
* nd/archive-attribute: archive test: attributes archive: do not read .gitattributes in working directory unpack-trees: do not muck with attributes when we are not checking out attr: add GIT_ATTR_INDEX "direction" archive tests: do not use .gitattributes in working directory
Diffstat (limited to 'unpack-trees.c')
-rw-r--r--unpack-trees.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/unpack-trees.c b/unpack-trees.c
index 6847c2d966..e4eb8fa3af 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;
}