mirror of
https://github.com/git-for-windows/git.git
synced 2026-07-10 21:50:17 -05:00
Merge pull request #1468 from atetubou/fscache_checkout_flush
checkout.c: enable fscache for checkout again Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
@@ -409,6 +409,18 @@ int fscache_enable(int enable)
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* Flush cached stats result when fscache is enabled.
|
||||
*/
|
||||
void fscache_flush(void)
|
||||
{
|
||||
if (enabled) {
|
||||
EnterCriticalSection(&mutex);
|
||||
fscache_clear();
|
||||
LeaveCriticalSection(&mutex);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Lstat replacement, uses the cache if enabled, otherwise redirects to
|
||||
* mingw_lstat.
|
||||
|
||||
@@ -7,6 +7,9 @@ int fscache_enable(int enable);
|
||||
int fscache_enabled(const char *path);
|
||||
#define is_fscache_enabled(path) fscache_enabled(path)
|
||||
|
||||
void fscache_flush(void);
|
||||
#define flush_fscache() fscache_flush()
|
||||
|
||||
DIR *fscache_opendir(const char *dir);
|
||||
int fscache_lstat(const char *file_name, struct stat *buf);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user