author | Junio C Hamano <gitster@pobox.com> | |
Sun, 1 Feb 2009 02:08:58 +0000 (18:08 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 1 Feb 2009 02:08:58 +0000 (18:08 -0800) |
* jc/maint-apply-fix:
builtin-apply.c: do not set bogus mode in check_preimage() for deleted path
builtin-apply.c: do not set bogus mode in check_preimage() for deleted path
builtin-apply.c | patch | blob | history |
diff --git a/builtin-apply.c b/builtin-apply.c
index b415daf07edacacd8bda0527bb5ed229be91c861..1e7f917d3908c0c2f70c7208cb8b0839782849e4 100644 (file)
--- 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;