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:
Linus Torvalds 2005-05-23 12:31:59 -07:00
parent 5831b563a4
commit 5e224a2ed0

View file

@ -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);