Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-05-23 12:40:33 +0400
committerJunio C Hamano <gitster@pobox.com>2009-05-23 12:40:33 +0400
commit3ed24211d48d9a297b3784347acbf7e0265a58f3 (patch)
tree9f17d3a6437704ae543655d8a84d2ec064f02a1a /diff-lib.c
parent5781e80ffd4cd0c52cdfbf85cac3bb299544a2fc (diff)
parent53996fe5397ff37c5934bb5e9b23ef5985b3d152 (diff)
Merge branch 'lt/maint-diff-reduce-lstat'
* lt/maint-diff-reduce-lstat: Teach 'git checkout' to preload the index contents Avoid unnecessary 'lstat()' calls in 'get_stat_data()'
Diffstat (limited to 'diff-lib.c')
-rw-r--r--diff-lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/diff-lib.c b/diff-lib.c
index a310fb2ad0..0aba6cda3c 100644
--- a/diff-lib.c
+++ b/diff-lib.c
@@ -214,7 +214,7 @@ static int get_stat_data(struct cache_entry *ce,
const unsigned char *sha1 = ce->sha1;
unsigned int mode = ce->ce_mode;
- if (!cached) {
+ if (!cached && !ce_uptodate(ce)) {
int changed;
struct stat st;
changed = check_removed(ce, &st);