Skip to content

Commit

Permalink
Merge pull request #22 from benpeart/fscache-refresh-index-gvfs
Browse files Browse the repository at this point in the history
Enable the filesystem cache (fscache) in refresh_index().
  • Loading branch information
benpeart authored Sep 27, 2018
2 parents 6e58372 + 346e51a commit 15102f3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions read-cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -1485,6 +1485,7 @@ int refresh_index(struct index_state *istate, unsigned int flags,
typechange_fmt = (in_porcelain ? "T\t%s\n" : "%s needs update\n");
added_fmt = (in_porcelain ? "A\t%s\n" : "%s needs update\n");
unmerged_fmt = (in_porcelain ? "U\t%s\n" : "%s: needs merge\n");
enable_fscache(1);
for (i = 0; i < istate->cache_nr; i++) {
struct cache_entry *ce, *new_entry;
int cache_errno = 0;
Expand Down Expand Up @@ -1549,6 +1550,7 @@ int refresh_index(struct index_state *istate, unsigned int flags,

replace_index_entry(istate, i, new_entry);
}
enable_fscache(0);
trace_performance_leave("refresh index");
return has_errors;
}
Expand Down

0 comments on commit 15102f3

Please sign in to comment.