aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-01-31 18:08:58 -0800
committerJunio C Hamano <gitster@pobox.com>2009-01-31 18:08:58 -0800
commit15b8e94aee06f004da178bc0bfaabd50a0fda242 (patch)
tree60f8ba1f2f7b9081484eb386efbb73c6096de812
parent32f2f11f39bf8fe0cfebdfbc36cc2476507d5f1c (diff)
parenta15080e5f43d840717f8e3b68410f26c8cd54db2 (diff)
downloadgit-15b8e94aee06f004da178bc0bfaabd50a0fda242.tar.gz
git-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
-rw-r--r--builtin-apply.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-apply.c b/builtin-apply.c
index b415daf07..1e7f917d3 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;