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>
Kjetil Barvik committed
Jan 18, 2009 at 16:14 UTC
bda6eb0da9b4e4e763b531c83cab9fd9f85934ff
2 files changed
+9
cache.h
+1
@@ -723,6 +723,7 @@ extern int has_symlink_leading_path(int len, const char *name);
723
extern int has_symlink_or_noent_leading_path(int len, const char *name);
724
extern int has_dirs_only_path(int len, const char *name, int prefix_len);
725
extern void invalidate_lstat_cache(int len, const char *name);
726
+extern void clear_lstat_cache(void);
727
728
extern struct alternate_object_database {
729
struct alternate_object_database *next;
symlinks.c
+8
@@ -195,6 +195,14 @@ void invalidate_lstat_cache(int len, const char *name)
195
}
196
}
197
198
+/*
199
+ * Completely clear the contents of the cache
200
+ */
201
+void clear_lstat_cache(void)
202
+{
203
+ reset_lstat_cache(0, 0);
204
+}
205
+
206
#define USE_ONLY_LSTAT 0
207
208
/*