Browse Source

git-apply: bad patch fragments are fatal

Don't just stop at them and look for the next header. Die,
die, die!
maint
Linus Torvalds 20 years ago
parent
commit
5e224a2ed0
  1. 2
      apply.c

2
apply.c

@ -240,7 +240,7 @@ static int apply_single_patch(char *line, unsigned long size) @@ -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…
Cancel
Save