summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c761898)
raw | patch | inline | side by side (parent: c761898)
author | Junio C Hamano <gitster@pobox.com> | |
Tue, 12 Jan 2010 05:18:20 +0000 (21:18 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 18 Jan 2010 06:49:36 +0000 (22:49 -0800) |
invalidate_lstat_cache() and clear_lstat_cache() are not used anywhere.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
cache.h | patch | blob | history | |
symlinks.c | patch | blob | history |
index 90edb5b261e69b5f6e6d0ceda6c40cc00b951eac..b4b2ba70f6875c01e0262089359f3f9da0ed8c32 100644 (file)
--- a/cache.h
+++ b/cache.h
extern int threaded_has_symlink_leading_path(struct cache_def *, const char *, int);
extern int has_symlink_or_noent_leading_path(const char *name, int len);
extern int has_dirs_only_path(const char *name, int len, int prefix_len);
-extern void invalidate_lstat_cache(const char *name, int len);
-extern void clear_lstat_cache(void);
extern void schedule_dir_for_removal(const char *name, int len);
extern void remove_scheduled_dirs(void);
diff --git a/symlinks.c b/symlinks.c
index 7b0a86d35776e8695423c13403c9f4fa3465017d..88601200114f857a57214a9bf0d02ffd39a83504 100644 (file)
--- a/symlinks.c
+++ b/symlinks.c
return ret_flags;
}
-/*
- * Invalidate the given 'name' from the cache, if 'name' matches
- * completely with the cache.
- */
-void invalidate_lstat_cache(const char *name, int len)
-{
- int match_len, previous_slash;
- struct cache_def *cache = &default_cache; /* FIXME */
-
- match_len = longest_path_match(name, len, cache->path, cache->len,
- &previous_slash);
- if (len == match_len) {
- if ((cache->track_flags & FL_DIR) && previous_slash > 0) {
- cache->path[previous_slash] = '\0';
- cache->len = previous_slash;
- cache->flags = FL_DIR;
- } else {
- reset_lstat_cache(cache);
- }
- }
-}
-
-/*
- * Completely clear the contents of the cache
- */
-void clear_lstat_cache(void)
-{
- struct cache_def *cache = &default_cache; /* FIXME */
- reset_lstat_cache(cache);
-}
-
#define USE_ONLY_LSTAT 0
/*