Convert update-index references in docs to add.
[gitweb.git] / diff-lib.c
index 91cd87742f9efd2c0fcf878c179bc6ed989cb50a..556d5345bfc74c720d35097d24322436ffdebe57 100644 (file)
@@ -170,9 +170,7 @@ static int get_stat_data(struct cache_entry *ce,
                }
                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;
                }
        }