mirror of
https://github.com/git/git
synced 2024-08-25 02:35:46 +00:00
unpack-trees: do not muck with attributes when we are not checking out
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
4191e80a3e
commit
66985e6629
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue