summaryrefslogtreecommitdiff
path: root/diff-lib.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-05-05 19:16:26 -0700
committerJunio C Hamano <gitster@pobox.com>2008-05-05 19:16:26 -0700
commit867fa20fe929942fba2345adc591e6f5c74f8c11 (patch)
treed1604efd64b03b8a4149a208edf1785d55dda225 /diff-lib.c
parente9dd7518666ae8bfb3d7ddbca1a00c018d2e79e8 (diff)
parent8fa29602d4cf8c9ec7d837f7308a9582a8372cb5 (diff)
downloadgit-867fa20fe929942fba2345adc591e6f5c74f8c11.tar.gz
Merge branch 'jc/lstat'
* jc/lstat: diff-files: mark an index entry we know is up-to-date as such write_index(): optimize ce_smudge_racily_clean_entry() calls with CE_UPTODATE
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 cfd629da48..9139e45fb9 100644
--- a/diff-lib.c
+++ b/diff-lib.c
@@ -479,8 +479,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,