From: David Turner Date: Tue, 25 Aug 2015 19:25:01 GMT Subject: Re: [PATCH v4 3/3] untracked cache: fix entry invalidation Message-ID: <1440530701.7859.3.camel@twopensource.com> In-Reply-To: <1439989286-24355-4-git-send-email-pclouds@gmail.com> On Wed, 2015-08-19 at 20:01 +0700, Nguyễn Thái Ngọc Duy wrote: > First, the current code in untracked_cache_invalidate_path() is wrong > because it can only handle paths "a" or "a/b", not "a/b/c" because > lookup_untracked() only looks for entries directly under the given > directory. In the last case, it will look for the entry "b/c" in > directory "a" instead. This means if you delete or add an entry in a > subdirectory, untracked cache may become out of date because it does not > invalidate properly. This is noticed by David Turner. > > The second problem is about invalidation inside a fully untracked/excluded > directory. In this case we may have to invalidate back to root. See the > comment block for detail. LGTM.