Skip to content

Commit a7c6df8

Browse files
committed
Merge pull request #1827 from benpeart/fscache_refresh_index
Enable the filesystem cache (fscache) in refresh_index().
2 parents 4902a7d + 5593eaf commit a7c6df8

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
@@ -1586,6 +1586,7 @@ int refresh_index(struct index_state *istate, unsigned int flags,
15861586
typechange_fmt = in_porcelain ? "T\t%s\n" : "%s: needs update\n";
15871587
added_fmt = in_porcelain ? "A\t%s\n" : "%s: needs update\n";
15881588
unmerged_fmt = in_porcelain ? "U\t%s\n" : "%s: needs merge\n";
1589+
enable_fscache(1);
15891590
/*
15901591
* Use the multi-threaded preload_index() to refresh most of the
15911592
* cache entries quickly then in the single threaded loop below,
@@ -1680,6 +1681,7 @@ int refresh_index(struct index_state *istate, unsigned int flags,
16801681
display_progress(progress, istate->cache_nr);
16811682
stop_progress(&progress);
16821683
trace_performance_leave("refresh index");
1684+
enable_fscache(0);
16831685
return has_errors;
16841686
}
16851687

0 commit comments

Comments
 (0)