зеркало из https://github.com/microsoft/git.git
git-apply: do not barf when updating an originally empty file.
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Родитель
8c9e7947c2
Коммит
3103cf9e1e
2
apply.c
2
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)
|
||||
|
|
Загрузка…
Ссылка в новой задаче