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

Function tweak_fsmonitor

fsmonitor.c:792–822  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

790}
791
792void tweak_fsmonitor(struct index_state *istate)
793{
794 unsigned int i;
795 int fsmonitor_enabled = (fsm_settings__get_mode(istate->repo)
796 > FSMONITOR_MODE_DISABLED);
797
798 if (istate->fsmonitor_dirty) {
799 if (fsmonitor_enabled) {
800 /* Mark all entries valid */
801 for (i = 0; i < istate->cache_nr; i++) {
802 if (S_ISGITLINK(istate->cache[i]->ce_mode))
803 continue;
804 istate->cache[i]->ce_flags |= CE_FSMONITOR_VALID;
805 }
806
807 /* Mark all previously saved entries as dirty */
808 assert_index_minimum(istate, istate->fsmonitor_dirty->bit_size);
809 ewah_each_bit(istate->fsmonitor_dirty, fsmonitor_ewah_callback, istate);
810
811 refresh_fsmonitor(istate);
812 }
813
814 ewah_free(istate->fsmonitor_dirty);
815 istate->fsmonitor_dirty = NULL;
816 }
817
818 if (fsmonitor_enabled)
819 add_fsmonitor(istate);
820 else
821 remove_fsmonitor(istate);
822}

Callers 1

post_read_index_fromFunction · 0.85

Calls 7

fsm_settings__get_modeFunction · 0.85
assert_index_minimumFunction · 0.85
ewah_each_bitFunction · 0.85
refresh_fsmonitorFunction · 0.85
ewah_freeFunction · 0.85
add_fsmonitorFunction · 0.85
remove_fsmonitorFunction · 0.85

Tested by

no test coverage detected