Skip to content

Commit c789350

Browse files
committed
Merge branch 'jc/maint-apply-fix' into maint
* jc/maint-apply-fix: builtin-apply.c: do not set bogus mode in check_preimage() for deleted path
2 parents 7b26171 + a15080e commit c789350

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
@@ -2448,7 +2448,7 @@ static int check_preimage(struct patch *patch, struct cache_entry **ce, struct s
24482448
if (st_mode != patch->old_mode)
24492449
fprintf(stderr, "warning: %s has type %o, expected %o\n",
24502450
old_name, st_mode, patch->old_mode);
2451-
if (!patch->new_mode)
2451+
if (!patch->new_mode && !patch->is_delete)
24522452
patch->new_mode = st_mode;
24532453
return 0;
24542454

0 commit comments

Comments
 (0)