aboutsummaryrefslogtreecommitdiffstats
path: root/apply.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-13 20:41:38 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-13 20:41:38 -0700
commitde4971b50076b5ef901c2ae0bbee9dd2c14f06ea (patch)
tree658788d2fc9c41af2114851538a4ad8415ec8c46 /apply.c
parent940c1bb0181cb20454bf3573134175f86983a0ce (diff)
downloadgit-de4971b50076b5ef901c2ae0bbee9dd2c14f06ea.tar.gz
git-apply: normalize file mode when comparing with expected value
Sine git only saves the 'x' bit, we shouldn't compare the stat contents directly.
Diffstat (limited to 'apply.c')
-rw-r--r--apply.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/apply.c b/apply.c
index cf40e5d4b6..c0cd1520db 100644
--- a/apply.c
+++ b/apply.c
@@ -1000,6 +1000,7 @@ static int check_patch(struct patch *patch)
}
if (patch->is_new < 0)
patch->is_new = 0;
+ st.st_mode = ntohl(create_ce_mode(st.st_mode));
if (!patch->old_mode)
patch->old_mode = st.st_mode;
if ((st.st_mode ^ patch->old_mode) & S_IFMT)