+core.checkstat::
+       Determines which stat fields to match between the index
+       and work tree. The user can set this to 'default' or
+       'minimal'. Default (or explicitly 'default'), is to check
+       all fields, including the sub-second part of mtime and ctime.
+
Setting 'minimal' implies core.trustctime = false

[snip]

> -     if (trust_ctime && ce->ce_ctime.sec != (unsigned int)st->st_ctime)
> -             changed |= CTIME_CHANGED;
> +     if (trust_ctime ? check_stat : trust_ctime/*false*/)
> +             if (ce->ce_ctime.sec != (unsigned int)st->st_ctime)
> +                     changed |= CTIME_CHANGED;

Could that be written as:
+       if (trust_ctime && check_stat && (ce->ce_ctime.sec != (unsigned 
int)st->st_ctime))
+                       changed |= CTIME_CHANGED;


>  
>  #ifdef USE_NSEC
> -     if (ce->ce_mtime.nsec != ST_MTIME_NSEC(*st))
> +     if (check_stat && ce->ce_mtime.nsec != ST_MTIME_NSEC(*st))
>               changed |= MTIME_CHANGED;
> -     if (trust_ctime && ce->ce_ctime.nsec != ST_CTIME_NSEC(*st))
> -             changed |= CTIME_CHANGED;
> +     if (trust_ctime ? check_stat : trust_ctime/*false*/)
> +             if (ce->ce_ctime.nsec != ST_CTIME_NSEC(*st))
> +                     changed |= CTIME_CHANGED;

And here:
+       if (trust_ctime && check_stat && (ce->ce_ctime.nsec != 
ST_CTIME_NSEC(*st))
+               changed |= CTIME_CHANGED;


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to