4 int cmd_main(int ac, const char **av)
6 struct index_state *istate = &the_index;
7 uint64_t now = getnanotime();
10 git_config_push_parameter("core.fsmonitor=keep");
11 setup_git_directory();
12 if (read_index_from(istate, get_index_file(), get_git_dir()) < 0)
13 die("unable to read index file");
14 if (!istate->fsmonitor_last_update) {
15 printf("no fsmonitor\n");
19 printf("fsmonitor last update %"PRIuMAX", (%.2f seconds ago)\n",
20 (uintmax_t)istate->fsmonitor_last_update,
21 (now - istate->fsmonitor_last_update)/1.0e9);
23 for (i = 0; i < istate->cache_nr; i++)
24 if (istate->cache[i]->ce_flags & CE_FSMONITOR_VALID)
27 printf(" valid: %d\n", valid);
28 printf(" invalid: %d\n", istate->cache_nr - valid);