Skip to content

Commit 509d9f2

Browse files
committed
Merge pull request #1827 from benpeart/fscache_refresh_index
Enable the filesystem cache (fscache) in refresh_index().
2 parents fa8c746 + f132ee5 commit 509d9f2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

read-cache.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1625,6 +1625,7 @@ int refresh_index(struct index_state *istate, unsigned int flags,
16251625
typechange_fmt = in_porcelain ? "T\t%s\n" : "%s: needs update\n";
16261626
added_fmt = in_porcelain ? "A\t%s\n" : "%s: needs update\n";
16271627
unmerged_fmt = in_porcelain ? "U\t%s\n" : "%s: needs merge\n";
1628+
enable_fscache(1);
16281629
/*
16291630
* Use the multi-threaded preload_index() to refresh most of the
16301631
* cache entries quickly then in the single threaded loop below,
@@ -1719,6 +1720,7 @@ int refresh_index(struct index_state *istate, unsigned int flags,
17191720
display_progress(progress, istate->cache_nr);
17201721
stop_progress(&progress);
17211722
trace_performance_leave("refresh index");
1723+
enable_fscache(0);
17221724
return has_errors;
17231725
}
17241726

0 commit comments

Comments
 (0)