diff options
Diffstat (limited to 'diff-lib.c')
-rw-r--r-- | diff-lib.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/diff-lib.c b/diff-lib.c index 8104603a3b..13ff00d81e 100644 --- a/diff-lib.c +++ b/diff-lib.c @@ -95,6 +95,9 @@ int run_diff_files(struct rev_info *revs, unsigned int option) diff_set_mnemonic_prefix(&revs->diffopt, "i/", "w/"); + if (!(option & DIFF_SKIP_FSMONITOR)) + refresh_fsmonitor(&the_index); + if (diff_unmerged_stage < 0) diff_unmerged_stage = 2; entries = active_nr; @@ -197,6 +200,9 @@ int run_diff_files(struct rev_info *revs, unsigned int option) if (ce_uptodate(ce) || ce_skip_worktree(ce)) continue; + if (ce->ce_flags & CE_FSMONITOR_VALID && !(option & DIFF_SKIP_FSMONITOR)) + continue; + /* If CE_VALID is set, don't look at workdir for file removal */ if (ce->ce_flags & CE_VALID) { changed = 0; |