mingw: add infrastructure for read-only file system level caches

Add a macro to mark code sections that only read from the file system,
along with a config option and documentation.

This facilitates implementation of relatively simple file system level
caches without the need to synchronize with the file system.

Enable read-only sections for 'git status' and preload_index.

Signed-off-by: Karsten Blees <blees@dcon.de>
This commit is contained in:
Karsten Blees
2013-09-08 14:23:27 +02:00
committed by Johannes Schindelin
parent 1b61208dc3
commit c0ee777d48
6 changed files with 33 additions and 0 deletions

View File

@@ -1623,6 +1623,7 @@ struct repository *repo UNUSED)
PATHSPEC_PREFER_FULL,
prefix, argv);
enable_fscache(1);
if (status_format != STATUS_FORMAT_PORCELAIN &&
status_format != STATUS_FORMAT_PORCELAIN_V2)
progress_flag = REFRESH_PROGRESS;