]> git.ipfire.org Git - thirdparty/git.git/blame - t/helper/test-dump-fsmonitor.c
t/helper: merge test-parse-options into test-tool
[thirdparty/git.git] / t / helper / test-dump-fsmonitor.c
CommitLineData
dd3551f4
BP
1#include "cache.h"
2
3int 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}