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

Function mark_fsmonitor_valid

fsmonitor.h:39–51  ·  view source on GitHub ↗

* 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

Source from the content-addressed store, hash-verified

37 * set it on submodules.
38 */
39static 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

Callers 4

preload_threadFunction · 0.85
run_diff_filesFunction · 0.85
fill_stat_cache_infoFunction · 0.85
refresh_cache_entFunction · 0.85

Calls 1

fsm_settings__get_modeFunction · 0.85

Tested by

no test coverage detected