aboutsummaryrefslogtreecommitdiff
path: root/diff-index.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-03-29 23:00:42 -0800
committerJunio C Hamano <junkio@cox.net>2006-03-29 23:53:05 -0800
commite464f4c3119b04712ab87329f3dd4d4f21b0a8a7 (patch)
tree29fabda26b9d057d6137fbea57a15a09da3b53af /diff-index.c
parent0c8b106b020421c346532351af36028bfdda4c37 (diff)
downloadgit-e464f4c3119b04712ab87329f3dd4d4f21b0a8a7.tar.gz
git-e464f4c3119b04712ab87329f3dd4d4f21b0a8a7.tar.xz
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: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'diff-index.c')
-rw-r--r--diff-index.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/diff-index.c b/diff-index.c
index 12a9418d6..e376d65f8 100644
--- a/diff-index.c
+++ b/diff-index.c
@@ -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;
}