Skip to content

Commit 7fee55e

Browse files
committed
Merge pull request #1827 from benpeart/fscache_refresh_index
Enable the filesystem cache (fscache) in refresh_index().
2 parents aa0df58 + dfec441 commit 7fee55e

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
@@ -1483,6 +1483,7 @@ int refresh_index(struct index_state *istate, unsigned int flags,
14831483
typechange_fmt = (in_porcelain ? "T\t%s\n" : "%s needs update\n");
14841484
added_fmt = (in_porcelain ? "A\t%s\n" : "%s needs update\n");
14851485
unmerged_fmt = (in_porcelain ? "U\t%s\n" : "%s: needs merge\n");
1486+
enable_fscache(1);
14861487
for (i = 0; i < istate->cache_nr; i++) {
14871488
struct cache_entry *ce, *new_entry;
14881489
int cache_errno = 0;
@@ -1547,6 +1548,7 @@ int refresh_index(struct index_state *istate, unsigned int flags,
15471548

15481549
replace_index_entry(istate, i, new_entry);
15491550
}
1551+
enable_fscache(0);
15501552
trace_performance_since(start, "refresh index");
15511553
return has_errors;
15521554
}

0 commit comments

Comments
 (0)