From fa49029577c93b507f875d3809ddd56429deef65 Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Tue, 2 Jan 2018 19:04:56 -0800 Subject: fsmonitor: use fsmonitor data in `git diff` 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 Signed-off-by: Junio C Hamano --- diff.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'diff.h') diff --git a/diff.h b/diff.h index 0fb18dd735..1c511b2a94 100644 --- a/diff.h +++ b/diff.h @@ -388,6 +388,8 @@ extern const char *diff_aligned_abbrev(const struct object_id *sha1, int); #define DIFF_SILENT_ON_REMOVED 01 /* report racily-clean paths as modified */ #define DIFF_RACY_IS_MODIFIED 02 +/* skip loading the fsmonitor data */ +#define DIFF_SKIP_FSMONITOR 04 extern int run_diff_files(struct rev_info *revs, unsigned int option); extern int run_diff_index(struct rev_info *revs, int cached); -- cgit v1.2.1