Merge branch 'nd/config-split'
[git/git.git] / t / helper / test-dump-fsmonitor.c
1 #include "cache.h"
2
3 int cmd_main(int ac, const char **av)
4 {
5 struct index_state *istate = &the_index;
6 int i;
7
8 setup_git_directory();
9 if (do_read_index(istate, get_index_file(), 0) < 0)
10 die("unable to read index file");
11 if (!istate->fsmonitor_last_update) {
12 printf("no fsmonitor\n");
13 return 0;
14 }
15 printf("fsmonitor last update %"PRIuMAX"\n", (uintmax_t)istate->fsmonitor_last_update);
16
17 for (i = 0; i < istate->cache_nr; i++)
18 printf((istate->cache[i]->ce_flags & CE_FSMONITOR_VALID) ? "+" : "-");
19
20 return 0;
21 }