MCPcopy Index your code
hub / github.com/git/git / ce_modified_check_fs

Function ce_modified_check_fs

read-cache.c:288–309  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

286}
287
288static int ce_modified_check_fs(struct index_state *istate,
289 const struct cache_entry *ce,
290 struct stat *st)
291{
292 switch (st->st_mode & S_IFMT) {
293 case S_IFREG:
294 if (ce_compare_data(istate, ce, st))
295 return DATA_CHANGED;
296 break;
297 case S_IFLNK:
298 if (ce_compare_link(ce, xsize_t(st->st_size)))
299 return DATA_CHANGED;
300 break;
301 case S_IFDIR:
302 if (S_ISGITLINK(ce->ce_mode))
303 return ce_compare_gitlink(ce) ? DATA_CHANGED : 0;
304 /* else fallthrough */
305 default:
306 return TYPE_CHANGED;
307 }
308 return 0;
309}
310
311static int ce_match_stat_basic(const struct cache_entry *ce, struct stat *st)
312{

Callers 3

ie_match_statFunction · 0.85
ie_modifiedFunction · 0.85

Calls 4

ce_compare_dataFunction · 0.85
ce_compare_linkFunction · 0.85
xsize_tFunction · 0.85
ce_compare_gitlinkFunction · 0.85

Tested by

no test coverage detected