Skip to content

Commit

Permalink
builtin-apply.c: do not set bogus mode in check_preimage() for delete…
Browse files Browse the repository at this point in the history
…d 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>
  • Loading branch information
Junio C Hamano committed Jan 29, 2009
1 parent 02322e1 commit a15080e
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 @@ -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;

Expand Down

0 comments on commit a15080e

Please sign in to comment.