From: Junio C Hamano Date: Sun, 11 Jan 2009 00:48:15 GMT Subject: Re: [PATCH/RFC v5 1/1] more cache effective symlink/directory detection Message-ID: <7vljtivfao.fsf@gitster.siamese.dyndns.org> In-Reply-To: <49687440.5090506@lsrfire.ath.cx> René Scharfe writes: > Kjetil Barvik schrieb: >> - Also introduce a 'void clear_lstat_cache(void)' function, which >> should be used to clean the cache before usage. If for instance, >> you have changed the types of directories which should be cached, >> the cache could contain a path which was not wanted. > > Is it possible to make the cache detect these situations automatically > by saving track_flags along with the cache contents? Not having to > clear the cache manually would be a major feature. > Also, it's probably worth to split this patch up again. First switching > to your improved implementation of has_symlink_leading_path(), then > introducing has_symlink_or_noent_leading_path() and finally adding > LSTAT_FULLPATH and the fourth parameter of lstat_cache() etc. and using > this feature in entry.c seems like a nice incremental progression. Both are reasonable suggestions. Thanks.