debian: new upstream release
[git/debian.git] / t / helper / test-dump-fsmonitor.c
blob975f0ac8905125f01ce37be5b7bc862cf058fbcf
1 #include "test-tool.h"
2 #include "cache.h"
4 int cmd__dump_fsmonitor(int ac, const char **av)
6 struct index_state *istate = the_repository->index;
7 int i;
9 setup_git_directory();
10 if (do_read_index(istate, the_repository->index_file, 0) < 0)
11 die("unable to read index file");
12 if (!istate->fsmonitor_last_update) {
13 printf("no fsmonitor\n");
14 return 0;
16 printf("fsmonitor last update %s\n", istate->fsmonitor_last_update);
18 for (i = 0; i < istate->cache_nr; i++)
19 printf((istate->cache[i]->ce_flags & CE_FSMONITOR_VALID) ? "+" : "-");
21 return 0;