Merge branch 'maint-1.6.0' into maint
[gitweb.git] / builtin-apply.c
index a8f75ed3ed411d8cf7a3ec9dfefef7407c50f447..3b6cd6dfaea0c8c427ab1a80ed11cabe60a5b32d 100644 (file)
@@ -2435,7 +2435,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)