From a15080e5f43d840717f8e3b68410f26c8cd54db2 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sun, 25 Jan 2009 23:41:26 -0800 Subject: 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 --- builtin-apply.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.2.1