summaryrefslogtreecommitdiff
path: root/builtin-diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-11-27 19:24:13 -0800
committerJunio C Hamano <gitster@pobox.com>2008-11-27 19:24:13 -0800
commit2af9664776a237baa7ce67789bc5d2b54a36d95c (patch)
tree7175a6e86b9f6dc1448dd2527d66f64a2e30c3ab /builtin-diff.c
parent98cdf78c5cf1356757ccc4d25c212ae1f38339e4 (diff)
parent7c4ea599b0d44e46c4f96bf955b62d96126b53ff (diff)
downloadgit-2af9664776a237baa7ce67789bc5d2b54a36d95c.tar.gz
Merge branch 'lt/preload-lstat'
* lt/preload-lstat: Fix index preloading for racy dirty case Add cache preload facility
Diffstat (limited to 'builtin-diff.c')
-rw-r--r--builtin-diff.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/builtin-diff.c b/builtin-diff.c
index b90d8bcdb6..dddcf697d7 100644
--- a/builtin-diff.c
+++ b/builtin-diff.c
@@ -134,8 +134,8 @@ static int builtin_diff_index(struct rev_info *revs,
revs->max_count != -1 || revs->min_age != -1 ||
revs->max_age != -1)
usage(builtin_diff_usage);
- if (read_cache() < 0) {
- perror("read_cache");
+ if (read_cache_preload(revs->diffopt.paths) < 0) {
+ perror("read_cache_preload");
return -1;
}
return run_diff_index(revs, cached);
@@ -234,8 +234,8 @@ static int builtin_diff_files(struct rev_info *revs, int argc, const char **argv
revs->combine_merges = revs->dense_combined_merges = 1;
setup_work_tree();
- if (read_cache() < 0) {
- perror("read_cache");
+ if (read_cache_preload(revs->diffopt.paths) < 0) {
+ perror("read_cache_preload");
return -1;
}
result = run_diff_files(revs, options);