Skip to content

Commit 5e224a2

Browse files
author
Linus Torvalds
committed
git-apply: bad patch fragments are fatal
Don't just stop at them and look for the next header. Die, die, die!
1 parent 5831b56 commit 5e224a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apply.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ static int apply_single_patch(char *line, unsigned long size)
240240
while (size > 4 && !memcmp(line, "@@ -", 4)) {
241241
int len = apply_fragment(line, size);
242242
if (len <= 0)
243-
break;
243+
die("corrupt patch");
244244

245245
printf("applying fragment:\n%.*s\n\n", len, line);
246246

0 commit comments

Comments
 (0)