X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=builtin-apply.c;h=f312798af38553e0badeda9732736a62460eae05;hb=6a0861a8a3295395238c8126c6e74c66b715c595;hp=1e7f917d3908c0c2f70c7208cb8b0839782849e4;hpb=15b8e94aee06f004da178bc0bfaabd50a0fda242;p=git.git diff --git a/builtin-apply.c b/builtin-apply.c index 1e7f917d3..f312798af 100644 --- a/builtin-apply.c +++ b/builtin-apply.c @@ -2441,7 +2441,7 @@ static int check_preimage(struct patch *patch, struct cache_entry **ce, struct s return error("%s: %s", old_name, strerror(errno)); } - if (!cached) + if (!cached && !tpatch) st_mode = ce_mode_from_stat(*ce, st->st_mode); if (patch->is_new < 0)