diff --git a/diff-lib.c b/diff-lib.c
index 91cd87742f9efd2c0fcf878c179bc6ed989cb50a..556d5345bfc74c720d35097d24322436ffdebe57 100644 (file)
--- a/diff-lib.c
+++ b/diff-lib.c
}
changed = ce_match_stat(ce, &st, 0);
if (changed) {
- mode = create_ce_mode(st.st_mode);
- if (!trust_executable_bit && S_ISREG(st.st_mode))
- mode = ce->ce_mode;
+ mode = ce_mode_from_stat(ce, st.st_mode);
sha1 = no_sha1;
}
}