diff options
| author | Junio C Hamano <gitster@pobox.com> | 2013-01-06 22:11:39 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2013-01-06 22:11:39 -0800 |
| commit | 2d0029e38f3ecd355b403ffa8a75416129439185 (patch) | |
| tree | 4701427ef62e3c44ac37c142a0643fd71e9144cc | |
| parent | 1fd365d5efab58453d9200d51ddf6ec700e03d8b (diff) | |
| parent | 686b2de0ceb2c5a1fb6c8822a8aceb8a05e2fc76 (diff) | |
Merge branch 'mz/oneway-merge-wo-u-no-lstat'
Optimize "read-tree -m <tree-ish>" without "-u".
* mz/oneway-merge-wo-u-no-lstat:
oneway_merge(): only lstat() when told to update worktree
| -rw-r--r-- | unpack-trees.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/unpack-trees.c b/unpack-trees.c index 6d9636623a..61acc5e564 100644 --- a/unpack-trees.c +++ b/unpack-trees.c @@ -1834,7 +1834,7 @@ int oneway_merge(struct cache_entry **src, struct unpack_trees_options *o) if (old && same(old, a)) { int update = 0; - if (o->reset && !ce_uptodate(old) && !ce_skip_worktree(old)) { + if (o->reset && o->update && !ce_uptodate(old) && !ce_skip_worktree(old)) { struct stat st; if (lstat(old->name, &st) || ie_match_stat(o->src_index, old, &st, CE_MATCH_IGNORE_VALID|CE_MATCH_IGNORE_SKIP_WORKTREE)) |
