summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a388373)
raw | patch | inline | side by side (parent: a388373)
author | Linus Torvalds <torvalds@linux-foundation.org> | |
Tue, 14 Jul 2009 21:19:10 +0000 (14:19 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 14 Jul 2009 22:17:01 +0000 (15:17 -0700) |
In our 'oneway_merge()' we always do an 'lstat()' to see if we might
need to mark the entry for updating.
But we really shouldn't need to do that when the cache entry is already
marked as being ce_uptodate(), and this makes us do unnecessary lstat()
calls if we have index preloading enabled.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
need to mark the entry for updating.
But we really shouldn't need to do that when the cache entry is already
marked as being ce_uptodate(), and this makes us do unnecessary lstat()
calls if we have index preloading enabled.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
unpack-trees.c | patch | blob | history |
diff --git a/unpack-trees.c b/unpack-trees.c
index f9d12aafba8255401cd4e6d749f8738eb6e0857e..48d862d3b478875c3747bdb39a8cba0068300e97 100644 (file)
--- a/unpack-trees.c
+++ b/unpack-trees.c
if (old && same(old, a)) {
int update = 0;
- if (o->reset) {
+ if (o->reset && !ce_uptodate(old)) {
struct stat st;
if (lstat(old->name, &st) ||
ie_match_stat(o->src_index, old, &st, CE_MATCH_IGNORE_VALID))