aboutsummaryrefslogtreecommitdiff
path: root/builtin-apply.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-02-05 18:06:11 -0800
committerJunio C Hamano <gitster@pobox.com>2009-02-05 18:06:11 -0800
commitc7893501e879ebb541a55e5633f7e0f1729407cb (patch)
tree4325c3d15466bdd00834b97ce005c29d525e4e3c /builtin-apply.c
parent7b261711a65154c2e3bc52a24bdc391085a1c17e (diff)
parenta15080e5f43d840717f8e3b68410f26c8cd54db2 (diff)
downloadgit-c7893501e879ebb541a55e5633f7e0f1729407cb.tar.gz
git-c7893501e879ebb541a55e5633f7e0f1729407cb.tar.xz
Merge branch 'jc/maint-apply-fix' into maint
* jc/maint-apply-fix: builtin-apply.c: do not set bogus mode in check_preimage() for deleted path
Diffstat (limited to 'builtin-apply.c')
-rw-r--r--builtin-apply.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-apply.c b/builtin-apply.c
index b31007ba9..58d998577 100644
--- a/builtin-apply.c
+++ b/builtin-apply.c
@@ -2448,7 +2448,7 @@ static int check_preimage(struct patch *patch, struct cache_entry **ce, struct s
if (st_mode != patch->old_mode)
fprintf(stderr, "warning: %s has type %o, expected %o\n",
old_name, st_mode, patch->old_mode);
- if (!patch->new_mode)
+ if (!patch->new_mode && !patch->is_delete)
patch->new_mode = st_mode;
return 0;