summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e06c43c)
raw | patch | inline | side by side (parent: e06c43c)
author | Junio C Hamano <gitster@pobox.com> | |
Sun, 30 Mar 2008 19:39:25 +0000 (12:39 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 13 Apr 2008 02:42:17 +0000 (19:42 -0700) |
This does not make any difference when running diff-files alone, but if
you internally run run_diff_files() and then run other operations further
on the index, we do not have to run lstat(2) again on entries we already
have checked.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
you internally run run_diff_files() and then run other operations further
on the index, we do not have to run lstat(2) again on entries we already
have checked.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff-lib.c | patch | blob | history |
diff --git a/diff-lib.c b/diff-lib.c
index 069e4507ae7caa70f79d5369bc61dfefd0f174e2..6e7ab29e343bd0aab10c54d5194527c233fa9e23 100644 (file)
--- a/diff-lib.c
+++ b/diff-lib.c
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,