From: Linus Torvalds Date: Tue, 14 Jun 2005 03:41:38 +0000 (-0700) Subject: git-apply: normalize file mode when comparing with expected value X-Git-Tag: v0.99~267 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=de4971b50076b5ef901c2ae0bbee9dd2c14f06ea;p=git.git 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. --- diff --git a/apply.c b/apply.c index cf40e5d4b..c0cd1520d 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)