Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-23 23:31:59 +0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-23 23:31:59 +0400
commit5e224a2ed01facb1233474dd169307f499e70257 (patch)
tree0dd1be2bcb0233828361603b68cccfb85fec9a51 /apply.c
parent5831b563a442e7c3198a444a51d8caba4d072506 (diff)
git-apply: bad patch fragments are fatal
Don't just stop at them and look for the next header. Die, die, die!
Diffstat (limited to 'apply.c')
-rw-r--r--apply.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apply.c b/apply.c
index 85d7965daa..536b068292 100644
--- a/apply.c
+++ b/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);