]>
Commit | Line | Data |
---|---|---|
f1ef0b02 | 1 | #include "test-tool.h" |
dd3551f4 BP |
2 | #include "cache.h" |
3 | ||
f1ef0b02 | 4 | int cmd__dump_fsmonitor(int ac, const char **av) |
dd3551f4 | 5 | { |
f8adbec9 | 6 | struct index_state *istate = the_repository->index; |
dd3551f4 BP |
7 | int i; |
8 | ||
9 | setup_git_directory(); | |
f8adbec9 | 10 | if (do_read_index(istate, the_repository->index_file, 0) < 0) |
dd3551f4 BP |
11 | die("unable to read index file"); |
12 | if (!istate->fsmonitor_last_update) { | |
13 | printf("no fsmonitor\n"); | |
14 | return 0; | |
15 | } | |
16 | printf("fsmonitor last update %"PRIuMAX"\n", (uintmax_t)istate->fsmonitor_last_update); | |
17 | ||
18 | for (i = 0; i < istate->cache_nr; i++) | |
19 | printf((istate->cache[i]->ce_flags & CE_FSMONITOR_VALID) ? "+" : "-"); | |
20 | ||
21 | return 0; | |
22 | } |