* Set the given cache entries CE_FSMONITOR_VALID bit. This should be * called any time the cache entry has been updated to reflect the * current state of the file on disk. * * However, never mark submodules as valid. When commands like "git * status" run they might need to recurse into the submodule (using a * child process) to get a summary of the submodule state. We don't * have (and do
| 37 | * set it on submodules. |
| 38 | */ |
| 39 | static inline void mark_fsmonitor_valid(struct index_state *istate, struct cache_entry *ce) |
| 40 | { |
| 41 | enum fsmonitor_mode fsm_mode = fsm_settings__get_mode(istate->repo); |
| 42 | |
| 43 | if (fsm_mode > FSMONITOR_MODE_DISABLED && |
| 44 | !(ce->ce_flags & CE_FSMONITOR_VALID)) { |
| 45 | if (S_ISGITLINK(ce->ce_mode)) |
| 46 | return; |
| 47 | istate->cache_changed |= FSMONITOR_CHANGED; |
| 48 | ce->ce_flags |= CE_FSMONITOR_VALID; |
| 49 | trace_printf_key(&trace_fsmonitor, "mark_fsmonitor_clean '%s'", ce->name); |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | /* |
| 54 | * Clear the given cache entry's CE_FSMONITOR_VALID bit and invalidate |
no test coverage detected