| 757 | } |
| 758 | |
| 759 | void add_fsmonitor(struct index_state *istate) |
| 760 | { |
| 761 | unsigned int i; |
| 762 | |
| 763 | if (!istate->fsmonitor_last_update) { |
| 764 | trace_printf_key(&trace_fsmonitor, "add fsmonitor"); |
| 765 | istate->cache_changed |= FSMONITOR_CHANGED; |
| 766 | initialize_fsmonitor_last_update(istate); |
| 767 | |
| 768 | /* reset the fsmonitor state */ |
| 769 | for (i = 0; i < istate->cache_nr; i++) |
| 770 | istate->cache[i]->ce_flags &= ~CE_FSMONITOR_VALID; |
| 771 | |
| 772 | /* reset the untracked cache */ |
| 773 | if (istate->untracked) { |
| 774 | add_untracked_cache(istate); |
| 775 | istate->untracked->use_fsmonitor = 1; |
| 776 | } |
| 777 | |
| 778 | /* Update the fsmonitor state */ |
| 779 | refresh_fsmonitor(istate); |
| 780 | } |
| 781 | } |
| 782 | |
| 783 | void remove_fsmonitor(struct index_state *istate) |
| 784 | { |
no test coverage detected