mirror of
https://github.com/git-for-windows/git.git
synced 2026-02-03 18:59:59 -06:00
Update enable_fscache() to take an optional initial size parameter which is used to initialize the hashmap so that it can avoid having to rehash as additional entries are added. Add a separate disable_fscache() macro to make the code clearer and easier to read. Signed-off-by: Ben Peart <benpeart@microsoft.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
18 lines
476 B
C
18 lines
476 B
C
#ifndef FSCACHE_H
|
|
#define FSCACHE_H
|
|
|
|
int fscache_enable(int enable, size_t initial_size);
|
|
#define enable_fscache(initial_size) fscache_enable(1, initial_size)
|
|
#define disable_fscache() fscache_enable(0, 0)
|
|
|
|
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);
|
|
|
|
#endif
|