Subject: Re: [PATCH 19/19] hack: watchman/untracked cache mashup

From: David Turner <[email-masked]>
Date: Thu, 17 Mar 2016 14:08:39 -0400

On Thu, 2016-03-17 at 20:06 +0700, Duy Nguyen wrote:
> On Thu, Mar 17, 2016 at 7:56 AM, David Turner <
> [email-masked]> wrote:
> > > So if we detect an updated file that's not in the index, we are
> > > prepared to invalidate that path, correct? We may invalidate more
> > > than
> > > necessary if that's true. Imagine a.o is already ignored. If it's
> > > rebuilt, we should not need to update untracked cache.
> > 
> > Yes, that's true.  But it would be true with the mtime system too.
> > This
> > is no worse, even if it's no better.  In-tree builds are a hard
> > case to
> > support, and I'm totally OK with a system that encourages out-of
> > -tree
> > builds.
> > 
> > We could check if it's ignored, but then if someone changes their
> > gitignore, we could be wrong.
> > 
> > Or we could suggest that people make their watchmanignore match
> > their
> > gitignore.
> 
> So your purpose is to reduce stat() on those "quiet" directories?

Yes.  Twitter's repo is perhaps somewhat unusual in that it has a very
"bushy" directory structure -- tens of thousands of directories.