summaryrefslogtreecommitdiff
path: root/t/helper/test-dump-fsmonitor.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-11-21 05:07:50 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-11-21 05:07:50 (GMT)
commite05336bddacb90cf243aacc0f7b7f34f900453d7 (patch)
treecb4a694c7de056ac7c4ec98e30b3b1c5b4cc3764 /t/helper/test-dump-fsmonitor.c
parentf5da077b1f9e28a473f8219d8b8391450b794abf (diff)
parent614a718a797e04fb037b25371896f910e464b671 (diff)
downloadgit-e05336bddacb90cf243aacc0f7b7f34f900453d7.zip
git-e05336bddacb90cf243aacc0f7b7f34f900453d7.tar.gz
git-e05336bddacb90cf243aacc0f7b7f34f900453d7.tar.bz2
Merge branch 'bp/fsmonitor'
We learned to talk to watchman to speed up "git status" and other operations that need to see which paths have been modified. * bp/fsmonitor: fsmonitor: preserve utf8 filenames in fsmonitor-watchman log fsmonitor: read entirety of watchman output fsmonitor: MINGW support for watchman integration fsmonitor: add a performance test fsmonitor: add a sample integration script for Watchman fsmonitor: add test cases for fsmonitor extension split-index: disable the fsmonitor extension when running the split index test fsmonitor: add a test tool to dump the index extension update-index: add fsmonitor support to update-index ls-files: Add support in ls-files to display the fsmonitor valid bit fsmonitor: add documentation for the fsmonitor extension. fsmonitor: teach git to optionally utilize a file system monitor to speed up detecting new or changed files. update-index: add a new --force-write-index option preload-index: add override to enable testing preload-index bswap: add 64 bit endianness helper get_be64
Diffstat (limited to 't/helper/test-dump-fsmonitor.c')
-rw-r--r--t/helper/test-dump-fsmonitor.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/t/helper/test-dump-fsmonitor.c b/t/helper/test-dump-fsmonitor.c
new file mode 100644
index 0000000..ad45270
--- /dev/null
+++ b/t/helper/test-dump-fsmonitor.c
@@ -0,0 +1,21 @@
+#include "cache.h"
+
+int cmd_main(int ac, const char **av)
+{
+ struct index_state *istate = &the_index;
+ int i;
+
+ setup_git_directory();
+ if (do_read_index(istate, get_index_file(), 0) < 0)
+ die("unable to read index file");
+ if (!istate->fsmonitor_last_update) {
+ printf("no fsmonitor\n");
+ return 0;
+ }
+ printf("fsmonitor last update %"PRIuMAX"\n", (uintmax_t)istate->fsmonitor_last_update);
+
+ for (i = 0; i < istate->cache_nr; i++)
+ printf((istate->cache[i]->ce_flags & CE_FSMONITOR_VALID) ? "+" : "-");
+
+ return 0;
+}