summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2009-02-05 18:06:11 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-02-05 18:06:11 -0800
commitc7893501e879ebb541a55e5633f7e0f1729407cb (patch)
tree4325c3d15466bdd00834b97ce005c29d525e4e3c
parentMerge branch 'am/maint-push-doc' into maint (diff)
parentbuiltin-apply.c: do not set bogus mode in check_preimage() for deleted path (diff)
downloadtgif-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
-rw-r--r--builtin-apply.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-apply.c b/builtin-apply.c
index b31007ba99..58d998577e 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;