Skip to content

Commit a2396dc

Browse files
committed
Merge pull request #1827 from benpeart/fscache_refresh_index
Enable the filesystem cache (fscache) in refresh_index().
2 parents a01dc7a + 794e732 commit a2396dc

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
@@ -1495,6 +1495,7 @@ int refresh_index(struct index_state *istate, unsigned int flags,
14951495
typechange_fmt = in_porcelain ? "T\t%s\n" : "%s: needs update\n";
14961496
added_fmt = in_porcelain ? "A\t%s\n" : "%s: needs update\n";
14971497
unmerged_fmt = in_porcelain ? "U\t%s\n" : "%s: needs merge\n";
1498+
enable_fscache(1);
14981499
/*
14991500
* Use the multi-threaded preload_index() to refresh most of the
15001501
* cache entries quickly then in the single threaded loop below,
@@ -1572,6 +1573,7 @@ int refresh_index(struct index_state *istate, unsigned int flags,
15721573
stop_progress(&progress);
15731574
}
15741575
trace_performance_leave("refresh index");
1576+
enable_fscache(0);
15751577
return has_errors;
15761578
}
15771579

0 commit comments

Comments
 (0)