aboutsummaryrefslogtreecommitdiff
path: root/builtin-apply.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-01-25 23:41:26 -0800
committerJunio C Hamano <gitster@pobox.com>2009-01-28 16:28:15 -0800
commita15080e5f43d840717f8e3b68410f26c8cd54db2 (patch)
treef57b7c0bcf49f58b9b0c98ac383f5305c407a13a /builtin-apply.c
parent02322e1619dc537dc48650761f6c9bae883612a7 (diff)
downloadgit-a15080e5f43d840717f8e3b68410f26c8cd54db2.tar.gz
git-a15080e5f43d840717f8e3b68410f26c8cd54db2.tar.xz
builtin-apply.c: do not set bogus mode in check_preimage() for deleted path
If it is deleted, it is deleted. Do not set the current mode to it. Signed-off-by: Junio C Hamano <gitster@pobox.com>
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 a8f75ed3e..8248e0947 100644
--- a/builtin-apply.c
+++ b/builtin-apply.c
@@ -2447,7 +2447,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;