diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-05-25 19:04:08 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-05-25 19:04:08 -0700 |
commit | 5e04a1ee33f82051668f09d73cf16348169e7f1f (patch) | |
tree | 2484cb203a6b0c68773371fc629b29536d1966c8 /diff-lib.c | |
parent | 597a1782460085105f7530c815e79cbb1de272d9 (diff) | |
parent | 53996fe5397ff37c5934bb5e9b23ef5985b3d152 (diff) | |
download | git-5e04a1ee33f82051668f09d73cf16348169e7f1f.tar.gz git-5e04a1ee33f82051668f09d73cf16348169e7f1f.tar.xz |
Merge branch 'lt/maint-diff-reduce-lstat' into maint
* 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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/diff-lib.c b/diff-lib.c index a310fb2ad..0aba6cda3 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); |