summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5bcf109)
raw | patch | inline | side by side (parent: 5bcf109)
author | Kjetil Barvik <barvik@broadpark.no> | |
Tue, 17 Mar 2009 18:20:29 +0000 (19:20 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 17 Mar 2009 19:10:58 +0000 (12:10 -0700) |
This reverts commit 7734f04873cfaddd0b148074a633f1f824fd961f.
I guess that the reverted commit, 7734f048, has been in test long
enough, and should now be reverted. I have not received any info
regarding any debug output of the reverted commit, so lets hope that
the lstat_cache() function do not cause any ping-pong.
Signed-off-by: Kjetil Barvik <barvik@broadpark.no>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
I guess that the reverted commit, 7734f048, has been in test long
enough, and should now be reverted. I have not received any info
regarding any debug output of the reverted commit, so lets hope that
the lstat_cache() function do not cause any ping-pong.
Signed-off-by: Kjetil Barvik <barvik@broadpark.no>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
symlinks.c | patch | blob | history |
diff --git a/symlinks.c b/symlinks.c
index cb255a318720c711dab34f3012da1bb1908fdac1..1d6b35b858020300f502e2a9341b82d4fa8a61fd 100644 (file)
--- a/symlinks.c
+++ b/symlinks.c
*/
}
-#define SWITCHES_BEFORE_WARNING 10
-static unsigned int cache_switches, number_of_warnings;
-static unsigned int current_cache_func, last_cache_func;
-static unsigned int total_calls;
-
#define FL_DIR (1 << 0)
#define FL_NOENT (1 << 1)
#define FL_SYMLINK (1 << 2)
int match_flags, ret_flags, save_flags, max_len, ret;
struct stat st;
- total_calls++;
if (cache.track_flags != track_flags ||
cache.prefix_len_stat_func != prefix_len_stat_func) {
/*
cache.track_flags = track_flags;
cache.prefix_len_stat_func = prefix_len_stat_func;
match_len = last_slash = 0;
- cache_switches++;
- if (cache_switches > SWITCHES_BEFORE_WARNING) {
- if (number_of_warnings < 10 || number_of_warnings % 1000 == 0)
- printf("warning from %s:%d cache_switches:%u > %u "\
- "(current:%u last:%u total:%u)\n",
- __FILE__, __LINE__,
- cache_switches, SWITCHES_BEFORE_WARNING,
- current_cache_func, last_cache_func,
- total_calls);
- number_of_warnings++;
- }
} else {
/*
* Check to see if we have a match from the cache for
*/
int has_symlink_leading_path(const char *name, int len)
{
- last_cache_func = current_cache_func;
- current_cache_func = 1;
return lstat_cache(name, len,
FL_SYMLINK|FL_DIR, USE_ONLY_LSTAT) &
FL_SYMLINK;
*/
int has_symlink_or_noent_leading_path(const char *name, int len)
{
- last_cache_func = current_cache_func;
- current_cache_func = 2;
return lstat_cache(name, len,
FL_SYMLINK|FL_NOENT|FL_DIR, USE_ONLY_LSTAT) &
(FL_SYMLINK|FL_NOENT);
*/
int has_dirs_only_path(const char *name, int len, int prefix_len)
{
- last_cache_func = current_cache_func;
- current_cache_func = 3;
return lstat_cache(name, len,
FL_DIR|FL_FULLPATH, prefix_len) &
FL_DIR;