MCPcopy Create free account
hub / github.com/git/git / is_racy_stat

Function is_racy_stat

read-cache.c:355–368  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

353}
354
355static int is_racy_stat(const struct index_state *istate,
356 const struct stat_data *sd)
357{
358 return (istate->timestamp.sec &&
359#ifdef USE_NSEC
360 /* nanosecond timestamped files can also be racy! */
361 (istate->timestamp.sec < sd->sd_mtime.sec ||
362 (istate->timestamp.sec == sd->sd_mtime.sec &&
363 istate->timestamp.nsec <= sd->sd_mtime.nsec))
364#else
365 istate->timestamp.sec <= sd->sd_mtime.sec
366#endif
367 );
368}
369
370int is_racy_timestamp(const struct index_state *istate,
371 const struct cache_entry *ce)

Callers 2

is_racy_timestampFunction · 0.85
match_stat_data_racyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected