Not all systems use st_[cm]tim field for ns resolution file timestamp
Some codepaths do not still use the ST_[CM]TIME_NSEC() pair of macros introduced by the previous commit but assumes all systems use st_mtim and st_ctim fields in "struct stat" to record nanosecond resolution part of the file timestamps. Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
@ -204,9 +204,9 @@ static int ce_match_stat_basic(struct cache_entry *ce, struct stat *st)
|
||||
changed |= CTIME_CHANGED;
|
||||
|
||||
#ifdef USE_NSEC
|
||||
if (ce->ce_mtime.nsec != (unsigned int)st->st_mtim.tv_nsec)
|
||||
if (ce->ce_mtime.nsec != ST_MTIME_NSEC(*st))
|
||||
changed |= MTIME_CHANGED;
|
||||
if (trust_ctime && ce->ce_ctime.nsec != (unsigned int)st->st_ctim.tv_nsec)
|
||||
if (trust_ctime && ce->ce_ctime.nsec != ST_CTIME_NSEC(*st))
|
||||
changed |= CTIME_CHANGED;
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user