mirror of
https://github.com/git-for-windows/git.git
synced 2026-03-20 20:36:33 -05:00
When FSCache is active, we can cache the reparse tag and use it directly to determine whether a path refers to an NTFS junction, without any additional, costly I/O. Note: this change only makes a difference with the next commit, which will make use of the FSCache in `git clean` (contingent on `core.fscache` set, of course). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
37 lines
919 B
C
37 lines
919 B
C
#ifndef FSCACHE_H
|
|
#define FSCACHE_H
|
|
|
|
/*
|
|
* The fscache is thread specific. enable_fscache() must be called
|
|
* for each thread where caching is desired.
|
|
*/
|
|
|
|
extern CRITICAL_SECTION fscache_cs;
|
|
|
|
int fscache_enable(size_t initial_size);
|
|
#define enable_fscache(initial_size) fscache_enable(initial_size)
|
|
|
|
void fscache_disable(void);
|
|
#define disable_fscache() fscache_disable()
|
|
|
|
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);
|
|
int fscache_is_mount_point(struct strbuf *path);
|
|
|
|
/* opaque fscache structure */
|
|
struct fscache;
|
|
|
|
struct fscache *fscache_getcache(void);
|
|
#define getcache_fscache() fscache_getcache()
|
|
|
|
void fscache_merge(struct fscache *dest);
|
|
#define merge_fscache(dest) fscache_merge(dest)
|
|
|
|
#endif
|