Git fork
at reftables-rust 52 lines 1.5 kB view raw
1#ifndef FSMONITOR_LL_H 2#define FSMONITOR_LL_H 3 4struct index_state; 5struct strbuf; 6 7extern struct trace_key trace_fsmonitor; 8 9/* 10 * Read the fsmonitor index extension and (if configured) restore the 11 * CE_FSMONITOR_VALID state. 12 */ 13int read_fsmonitor_extension(struct index_state *istate, const void *data, unsigned long sz); 14 15/* 16 * Fill the fsmonitor_dirty ewah bits with their state from the index, 17 * before it is split during writing. 18 */ 19void fill_fsmonitor_bitmap(struct index_state *istate); 20 21/* 22 * Write the CE_FSMONITOR_VALID state into the fsmonitor index 23 * extension. Reads from the fsmonitor_dirty ewah in the index. 24 */ 25void write_fsmonitor_extension(struct strbuf *sb, struct index_state *istate); 26 27/* 28 * Add/remove the fsmonitor index extension 29 */ 30void add_fsmonitor(struct index_state *istate); 31void remove_fsmonitor(struct index_state *istate); 32 33/* 34 * Add/remove the fsmonitor index extension as necessary based on the current 35 * core.fsmonitor setting. 36 */ 37void tweak_fsmonitor(struct index_state *istate); 38 39/* 40 * Run the configured fsmonitor integration script and clear the 41 * CE_FSMONITOR_VALID bit for any files returned as dirty. Also invalidate 42 * any corresponding untracked cache directory structures. Optimized to only 43 * run the first time it is called. 44 */ 45void refresh_fsmonitor(struct index_state *istate); 46 47/* 48 * Does the received result contain the "trivial" response? 49 */ 50int fsmonitor_is_trivial_response(const struct strbuf *query_result); 51 52#endif /* FSMONITOR_LL_H */