Re: [PATCH v2] Make git selectively and conditionally ignore certain stat fields
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 14, 2013, 21:57 UTC
- Message-ID
- <7vmwwb8m25.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <1358197878-36736-1-git-send-email-robin.rosenberg@dewire.com>
Robin Rosenberg <robin.rosenberg@dewire.com> writes:
Show 11 quoted lines
> diff --git a/read-cache.c b/read-cache.c > index fda78bc..f7fe15d 100644 > --- a/read-cache.c > +++ b/read-cache.c > @@ -197,8 +197,9 @@ static int ce_match_stat_basic(struct cache_entry *ce, struct stat *st) > } > if (ce->ce_mtime.sec != (unsigned int)st->st_mtime) > changed |= MTIME_CHANGED; > - if (trust_ctime && ce->ce_ctime.sec != (unsigned int)st->st_ctime) > - changed |= CTIME_CHANGED; > + if ((trust_ctime || ((check_nonzero_stat&CHECK_NONZERO_STAT_CTIME) && ce->ce_ctime.sec)))
One SP is required on each side of a binary operator; please have one after check_nonzero_stat and after the & after it.
I wonder if we should lose the trust_ctime variable and use this check_nonzero_stat bitset exclusively, provided that this were a good direction to go?