Re: [PATCH v12 09/20] read-cache: add watchman 'WAMA' extension

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 19, 2016 at 11:45 PM, David Turner <dturner@xxxxxxxxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]