Skip to content

Commit

Permalink
Merge pull request git-for-windows#1827 from benpeart/fscache_refresh…
Browse files Browse the repository at this point in the history
…_index

Enable the filesystem cache (fscache) in refresh_index().
  • Loading branch information
dscho committed Feb 7, 2019
2 parents 14e5160 + 96d293f commit 2d2d28c
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 @@ -1495,6 +1495,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);
/*
* Use the multi-threaded preload_index() to refresh most of the
* cache entries quickly then in the single threaded loop below,
Expand Down Expand Up @@ -1572,6 +1573,7 @@ int refresh_index(struct index_state *istate, unsigned int flags,
stop_progress(&progress);
}
trace_performance_leave("refresh index");
enable_fscache(0);
return has_errors;
}

Expand Down

0 comments on commit 2d2d28c

Please sign in to comment.