git-rerere: detect unparsable conflicts
rerere did not detect the case where <<< === >>> markers did not match. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano committed
Jun 22, 2008 at 00:21 UTC
a1b32fdc3d1d05395f186bfa06e92174519dab8d
1 file changed
+5
builtin-rerere.c
+5
@@ -144,6 +144,11 @@ static int handle_file(const char *path,
144
fclose(out);
145
if (sha1)
146
SHA1_Final(sha1, &ctx);
147
+ if (hunk) {
148
+ if (output)
149
+ unlink(output);
150
+ return error("Could not parse conflict hunks in %s", path);
151
+ }
152
return hunk_no;
153
}
154