| 286 | } |
| 287 | |
| 288 | static 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 | |
| 311 | static int ce_match_stat_basic(const struct cache_entry *ce, struct stat *st) |
| 312 | { |
no test coverage detected