Skip to content

Commit 3147896

Browse files
committed
Merge pull request #1827 from benpeart/fscache_refresh_index
Enable the filesystem cache (fscache) in refresh_index().
2 parents af3777f + 115dbee commit 3147896

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
@@ -1535,6 +1535,7 @@ int refresh_index(struct index_state *istate, unsigned int flags,
15351535
typechange_fmt = in_porcelain ? "T\t%s\n" : "%s: needs update\n";
15361536
added_fmt = in_porcelain ? "A\t%s\n" : "%s: needs update\n";
15371537
unmerged_fmt = in_porcelain ? "U\t%s\n" : "%s: needs merge\n";
1538+
enable_fscache(1);
15381539
/*
15391540
* Use the multi-threaded preload_index() to refresh most of the
15401541
* cache entries quickly then in the single threaded loop below,
@@ -1629,6 +1630,7 @@ int refresh_index(struct index_state *istate, unsigned int flags,
16291630
display_progress(progress, istate->cache_nr);
16301631
stop_progress(&progress);
16311632
trace_performance_leave("refresh index");
1633+
enable_fscache(0);
16321634
return has_errors;
16331635
}
16341636

0 commit comments

Comments
 (0)