On Thu, May 19, 2016 at 11:45 PM, David Turner [off-list ref] wrote:
quoted hunk ↗ jump to hunk
@@ -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