]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'bp/fsmonitor'
authorJunio C Hamano <gitster@pobox.com>
Tue, 21 Nov 2017 05:07:50 +0000 (14:07 +0900)
committerJunio C Hamano <gitster@pobox.com>
Tue, 21 Nov 2017 05:07:50 +0000 (14:07 +0900)
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

18 files changed:
1  2 
Documentation/config.txt
Documentation/git-update-index.txt
Documentation/githooks.txt
Makefile
builtin/ls-files.c
builtin/update-index.c
cache.h
config.c
config.h
diff-lib.c
dir.c
dir.h
entry.c
environment.c
read-cache.c
submodule.c
t/helper/.gitignore
unpack-trees.c

Simple merge
Simple merge
Simple merge
diff --cc Makefile
Simple merge
Simple merge
index fefbe601673398e6f63e20f63e669a5ef548c776,41618db098810efff937fa3b2a4de75be653809b..58d1c2d2827d61899d73f1ea7632c5ee219f3ace
@@@ -917,7 -923,9 +925,9 @@@ int cmd_update_index(int argc, const ch
        struct refresh_params refresh_args = {0, &has_errors};
        int lock_error = 0;
        int split_index = -1;
 -      struct lock_file *lock_file;
+       int force_write = 0;
+       int fsmonitor = -1;
 +      struct lock_file lock_file = LOCK_INIT;
        struct parse_opt_ctx_t ctx;
        strbuf_getline_fn getline_fn;
        int parseopt_state = PARSE_OPT_UNKNOWN;
diff --cc cache.h
Simple merge
diff --cc config.c
Simple merge
diff --cc config.h
Simple merge
diff --cc diff-lib.c
index 731f0886d6e4146ca526f222381de50406957b30,23c6d03ca922c42c6d8efaf6d41c6ae5139efb10..5173023cd3c3e4390e9ddc08e898d813f6a32093
@@@ -229,7 -229,8 +230,8 @@@ int run_diff_files(struct rev_info *rev
  
                if (!changed && !dirty_submodule) {
                        ce_mark_uptodate(ce);
 -                      if (!DIFF_OPT_TST(&revs->diffopt, FIND_COPIES_HARDER))
+                       mark_fsmonitor_valid(ce);
 +                      if (!revs->diffopt.flags.find_copies_harder)
                                continue;
                }
                oldmode = ce->ce_mode;
diff --cc dir.c
Simple merge
diff --cc dir.h
Simple merge
diff --cc entry.c
index 944c183b0f9cce90d62a2d998098ca48fc53c450,3a7b6673738302e2c549053b024e31ab9f8df56c..30211447ac839899d2c232af232c95312856816c
+++ b/entry.c
@@@ -368,14 -355,12 +369,15 @@@ finish
        if (state->refresh_cache) {
                assert(state->istate);
                if (!fstat_done)
 -                      lstat(ce->name, &st);
 +                      if (lstat(ce->name, &st) < 0)
 +                              return error_errno("unable to stat just-written file %s",
 +                                                 ce->name);
                fill_stat_cache_info(ce, &st);
                ce->ce_flags |= CE_UPDATE_IN_BASE;
+               mark_fsmonitor_invalid(state->istate, ce);
                state->istate->cache_changed |= CE_ENTRY_CHANGED;
        }
 +delayed:
        return 0;
  }
  
diff --cc environment.c
Simple merge
diff --cc read-cache.c
Simple merge
diff --cc submodule.c
Simple merge
Simple merge
diff --cc unpack-trees.c
Simple merge