Merge branch 'jc/maint-apply-fix'

* jc/maint-apply-fix:
  builtin-apply.c: do not set bogus mode in check_preimage() for deleted path
This commit is contained in:
Junio C Hamano 2009-01-31 18:08:58 -08:00
commit 15b8e94aee

View File

@ -2453,7 +2453,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;