summaryrefslogtreecommitdiff
path: root/diff-lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'diff-lib.c')
-rw-r--r--diff-lib.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/diff-lib.c b/diff-lib.c
index 4a3e255..c5894c7 100644
--- a/diff-lib.c
+++ b/diff-lib.c
@@ -498,8 +498,11 @@ int run_diff_files(struct rev_info *revs, unsigned int option)
continue;
}
changed = ce_match_stat(ce, &st, ce_option);
- if (!changed && !DIFF_OPT_TST(&revs->diffopt, FIND_COPIES_HARDER))
- continue;
+ if (!changed) {
+ ce_mark_uptodate(ce);
+ if (!DIFF_OPT_TST(&revs->diffopt, FIND_COPIES_HARDER))
+ continue;
+ }
oldmode = ce->ce_mode;
newmode = ce_mode_from_stat(ce, st.st_mode);
diff_change(&revs->diffopt, oldmode, newmode,