summaryrefslogtreecommitdiff
path: root/builtin-apply.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2009-01-31 18:08:58 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-01-31 18:08:58 -0800
commit15b8e94aee06f004da178bc0bfaabd50a0fda242 (patch)
tree60f8ba1f2f7b9081484eb386efbb73c6096de812 /builtin-apply.c
parentMerge branch 'am/maint-push-doc' (diff)
parentbuiltin-apply.c: do not set bogus mode in check_preimage() for deleted path (diff)
downloadtgif-15b8e94aee06f004da178bc0bfaabd50a0fda242.tar.xz
Merge branch 'jc/maint-apply-fix'
* 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 b415daf07e..1e7f917d39 100644
--- a/builtin-apply.c
+++ b/builtin-apply.c
@@ -2453,7 +2453,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;