From: Junio C Hamano Date: Tue, 21 Nov 2017 05:07:50 +0000 (+0900) Subject: Merge branch 'bp/fsmonitor' X-Git-Tag: v2.16.0-rc0~112 X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fgit.git;a=commitdiff_plain;h=e05336bddacb90cf243aacc0f7b7f34f900453d7 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 --- e05336bddacb90cf243aacc0f7b7f34f900453d7 diff --cc builtin/update-index.c index fefbe60167,41618db098..58d1c2d282 --- a/builtin/update-index.c +++ b/builtin/update-index.c @@@ -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; + int force_write = 0; + int fsmonitor = -1; - struct lock_file *lock_file; + 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 diff-lib.c index 731f0886d6,23c6d03ca9..5173023cd3 --- a/diff-lib.c +++ b/diff-lib.c @@@ -229,7 -229,8 +230,8 @@@ int run_diff_files(struct rev_info *rev if (!changed && !dirty_submodule) { ce_mark_uptodate(ce); + mark_fsmonitor_valid(ce); - if (!DIFF_OPT_TST(&revs->diffopt, FIND_COPIES_HARDER)) + if (!revs->diffopt.flags.find_copies_harder) continue; } oldmode = ce->ce_mode; diff --cc entry.c index 944c183b0f,3a7b667373..30211447ac --- a/entry.c +++ 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; }