Merge branch 'lt/preload-lstat'
* lt/preload-lstat: Fix index preloading for racy dirty case Add cache preload facility
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user