From: Junio C Hamano Date: Mon, 26 Jan 2009 07:41:26 +0000 (-0800) Subject: builtin-apply.c: do not set bogus mode in check_preimage() for deleted path X-Git-Tag: v1.6.1.3~2^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a15080e5f43d840717f8e3b68410f26c8cd54db2;p=git.git 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 --- 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;