mirror of
https://github.com/git/git
synced 2024-10-30 04:01:21 +00:00
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>
This commit is contained in:
parent
02322e1619
commit
a15080e5f4
1 changed files with 1 additions and 1 deletions
|
@ -2447,7 +2447,7 @@ static int check_preimage(struct patch *patch, struct cache_entry **ce, struct s
|
||||||
if (st_mode != patch->old_mode)
|
if (st_mode != patch->old_mode)
|
||||||
fprintf(stderr, "warning: %s has type %o, expected %o\n",
|
fprintf(stderr, "warning: %s has type %o, expected %o\n",
|
||||||
old_name, st_mode, patch->old_mode);
|
old_name, st_mode, patch->old_mode);
|
||||||
if (!patch->new_mode)
|
if (!patch->new_mode && !patch->is_delete)
|
||||||
patch->new_mode = st_mode;
|
patch->new_mode = st_mode;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue