1
0
mirror of https://github.com/git/git synced 2024-07-02 15:48:44 +00:00

lstat_cache(): introduce clear_lstat_cache() function

If you want to completely clear the contents of the lstat_cache(), then
call this new function.

Signed-off-by: Kjetil Barvik <barvik@broadpark.no>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Kjetil Barvik 2009-01-18 16:14:54 +01:00 committed by Junio C Hamano
parent aeabab5c71
commit bda6eb0da9
2 changed files with 9 additions and 0 deletions

View File

@ -723,6 +723,7 @@ extern int has_symlink_leading_path(int len, const char *name);
extern int has_symlink_or_noent_leading_path(int len, const char *name);
extern int has_dirs_only_path(int len, const char *name, int prefix_len);
extern void invalidate_lstat_cache(int len, const char *name);
extern void clear_lstat_cache(void);
extern struct alternate_object_database {
struct alternate_object_database *next;

View File

@ -195,6 +195,14 @@ void invalidate_lstat_cache(int len, const char *name)
}
}
/*
* Completely clear the contents of the cache
*/
void clear_lstat_cache(void)
{
reset_lstat_cache(0, 0);
}
#define USE_ONLY_LSTAT 0
/*