Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/t/helper/test-dump-fsmonitor.c # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / t / helper / test-dump-fsmonitor.c` 25 lines ยท 674 bytes Raw Blame History 1 #define USE_THE_REPOSITORY_VARIABLE 2 3 #include "test-tool.h" 4 #include "read-cache-ll.h" 5 #include "repository.h" 6 #include "setup.h" 7 8 int cmd__dump_fsmonitor(int ac UNUSED, const char **av UNUSED) 9 { 10 struct index_state *istate = the_repository->index; 11 12 setup_git_directory(the_repository); 13 if (do_read_index(istate, the_repository->index_file, 0) < 0) 14 die("unable to read index file"); 15 if (!istate->fsmonitor_last_update) { 16 printf("no fsmonitor\n"); 17 return 0; 18 } 19 printf("fsmonitor last update %s\n", istate->fsmonitor_last_update); 20 21 for (size_t i = 0; i < istate->cache_nr; i++) 22 printf((istate->cache[i]->ce_flags & CE_FSMONITOR_VALID) ? "+" : "-"); 23 24 return 0; 25 }