Skip to content

Commit a15080e

Browse files
committed
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 <[email protected]>
1 parent 02322e1 commit a15080e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin-apply.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2447,7 +2447,7 @@ static int check_preimage(struct patch *patch, struct cache_entry **ce, struct s
24472447
if (st_mode != patch->old_mode)
24482448
fprintf(stderr, "warning: %s has type %o, expected %o\n",
24492449
old_name, st_mode, patch->old_mode);
2450-
if (!patch->new_mode)
2450+
if (!patch->new_mode && !patch->is_delete)
24512451
patch->new_mode = st_mode;
24522452
return 0;
24532453

0 commit comments

Comments
 (0)