Skip to content

Commit

Permalink
lstat_cache(): introduce clear_lstat_cache() function
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kjetil Barvik authored and Junio C Hamano committed Jan 18, 2009
1 parent aeabab5 commit bda6eb0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 8 additions & 0 deletions symlinks.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

/*
Expand Down

0 comments on commit bda6eb0

Please sign in to comment.