Skip to content

Commit

Permalink
unpack-trees: do not muck with attributes when we are not checking out
Browse files Browse the repository at this point in the history
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Junio C Hamano committed Apr 18, 2009
1 parent 4191e80 commit 66985e6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions unpack-trees.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];

Expand All @@ -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;
}

Expand Down

0 comments on commit 66985e6

Please sign in to comment.