diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-01-25 23:41:26 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-01-28 16:28:15 -0800 |
commit | a15080e5f43d840717f8e3b68410f26c8cd54db2 (patch) | |
tree | f57b7c0bcf49f58b9b0c98ac383f5305c407a13a /builtin-apply.c | |
parent | 02322e1619dc537dc48650761f6c9bae883612a7 (diff) | |
download | git-a15080e5f43d840717f8e3b68410f26c8cd54db2.tar.gz |
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 <gitster@pobox.com>
Diffstat (limited to 'builtin-apply.c')
-rw-r--r-- | builtin-apply.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-apply.c b/builtin-apply.c index a8f75ed3ed..8248e09476 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; |