From: Duy Nguyen Date: Sat, 25 Jun 2016 14:59:11 GMT Subject: Re: [PATCH v12 09/20] read-cache: add watchman 'WAMA' extension Message-ID: In-Reply-To: <1463694357-6503-10-git-send-email-dturner@twopensource.com> On Thu, May 19, 2016 at 11:45 PM, David Turner wrote: > @@ -1222,8 +1225,13 @@ int refresh_index(struct index_state *istate, unsigned int flags, > continue; > > new = refresh_cache_ent(istate, ce, options, &cache_errno, &changed); > - if (new == ce) > + if (new == ce) { > + if (ce->ce_flags & CE_WATCHMAN_DIRTY) { I would add a note here since it took me a bit of time to understand why we cleared this. Maybe something like this? "The rule is index-helper sets watchman-dirty when a file is changed, then git clears it when it has verified that in-index entry now matches the worktree version. index-helper does not clear the bit and git does not set it. We have verified here that stat info (and even content) matches, so it's safe to clear watchman-dirty now" -- Duy