mirror of
https://github.com/git/git.git
synced 2025-03-15 09:32:27 +00:00
git-apply: bad patch fragments are fatal
Don't just stop at them and look for the next header. Die, die, die!
This commit is contained in:
parent
5831b563a4
commit
5e224a2ed0
2
apply.c
2
apply.c
@ -240,7 +240,7 @@ static int apply_single_patch(char *line, unsigned long size)
|
||||
while (size > 4 && !memcmp(line, "@@ -", 4)) {
|
||||
int len = apply_fragment(line, size);
|
||||
if (len <= 0)
|
||||
break;
|
||||
die("corrupt patch");
|
||||
|
||||
printf("applying fragment:\n%.*s\n\n", len, line);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user