Fix "Do not ignore a detected patchfile brokenness."
authorJunio C Hamano <junkio@cox.net>
Tue, 9 Jan 2007 19:50:53 +0000 (11:50 -0800)
committerJunio C Hamano <junkio@cox.net>
Tue, 9 Jan 2007 19:50:53 +0000 (11:50 -0800)
Returning negative value from there does not stop the caller from using
the earlier part.

Noticed by Linus.

Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-apply.c
index 6a06be3025d0455259d7a94a884433b8998dbb99..721d011bd05dee0e0f3e86514600b3c919f40b79 100644 (file)
@@ -812,7 +812,8 @@ static int find_header(char *line, unsigned long size, int *hdrsize, struct patc
                        struct fragment dummy;
                        if (parse_fragment_header(line, len, &dummy) < 0)
                                continue;
-                       return error("patch fragment without header at line %d: %.*s", linenr, (int)len-1, line);
+                       die("patch fragment without header at line %d: %.*s",
+                           linenr, (int)len-1, line);
                }
 
                if (size < len + 6)