summaryrefslogtreecommitdiff
path: root/builtin/add.c
diff options
context:
space:
mode:
authorAlex Vandiver <alexmv@dropbox.com>2018-01-02 19:04:56 -0800
committerJunio C Hamano <gitster@pobox.com>2018-01-04 15:06:43 -0800
commitfa49029577c93b507f875d3809ddd56429deef65 (patch)
treee9336d8e6f604eb94767ec9f5a99d81aab1ac696 /builtin/add.c
parenta75d1104072a035307e48b9d7c2696760c3a1f9a (diff)
downloadgit-av/fsmonitor-updates.tar.gz
fsmonitor: use fsmonitor data in `git diff`av/fsmonitor-updates
This makes use of the fsmonitor extension to skip lstat() calls on files that fsmonitor judged as unmodified. We skip use of the fsmonitor extension when called by "add" because the format_callback in such cases expects to be called even when the file is believed to be "up to date" with the index. Signed-off-by: Alex Vandiver <alexmv@dropbox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/add.c')
-rw-r--r--builtin/add.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/add.c b/builtin/add.c
index bf01d89e28..bba20b46e0 100644
--- a/builtin/add.c
+++ b/builtin/add.c
@@ -119,7 +119,7 @@ int add_files_to_cache(const char *prefix,
rev.diffopt.format_callback_data = &data;
rev.diffopt.flags.override_submodule_config = 1;
rev.max_count = 0; /* do not compare unmerged paths with stage #2 */
- run_diff_files(&rev, DIFF_RACY_IS_MODIFIED);
+ run_diff_files(&rev, DIFF_RACY_IS_MODIFIED | DIFF_SKIP_FSMONITOR);
clear_pathspec(&rev.prune_data);
return !!data.add_errors;
}