X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=apply.c;h=2da225a8ecae356c1b3376d5a0671940f265509c;hb=dcd0409fc545e881a61f522eb8f1d1a7e814eb94;hp=179b3bbd00fc6da726491639920ba6540c9b3c71;hpb=ea75cb7284f79250bebb6dd48c6161b0f1b4c1c6;p=git.git diff --git a/apply.c b/apply.c index 179b3bbd..2da225a8 100644 --- a/apply.c +++ b/apply.c @@ -834,7 +834,7 @@ static int parse_fragment(char *line, unsigned long size, struct patch *patch, s patch->new_name = NULL; } - if (patch->is_new != !oldlines) + if (patch->is_new && oldlines) return error("new file depends on old contents"); if (patch->is_delete != !newlines) { if (newlines)