提交 e464f4c3 编写于 作者: J Junio C Hamano

assume unchanged git: diff-index fix.

When the executable bit is untrustworthy and when we are
comparing the tree with the working tree, we tried to reuse the
mode bits recorded in the index incorrectly (the computation was
bogus on little endian architectures).  Just use mode from index
when it is a regular file.
Signed-off-by: NJunio C Hamano <junkio@cox.net>
上级 0c8b106b
......@@ -36,9 +36,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(mode) && S_ISREG(ce->ce_mode) &&
((mode ^ ce->ce_mode) == 0111))
if (!trust_executable_bit && S_ISREG(st.st_mode))
mode = ce->ce_mode;
sha1 = no_sha1;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册