Skip to content

Commit

Permalink
Merge branch 'jc/maint-apply-fix' into maint
Browse files Browse the repository at this point in the history
* jc/maint-apply-fix:
  builtin-apply.c: do not set bogus mode in check_preimage() for deleted path
  • Loading branch information
Junio C Hamano committed Feb 6, 2009
2 parents 7b26171 + a15080e commit c789350
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builtin-apply.c
Original file line number Diff line number Diff line change
Expand Up @@ -2448,7 +2448,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;

Expand Down

0 comments on commit c789350

Please sign in to comment.