]> asedeno.scripts.mit.edu Git - git.git/commitdiff
git-rerere: detect unparsable conflicts
authorJunio C Hamano <gitster@pobox.com>
Sun, 22 Jun 2008 07:21:28 +0000 (00:21 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sun, 22 Jun 2008 07:54:40 +0000 (00:54 -0700)
rerere did not detect the case where <<< === >>> markers did not match.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-rerere.c

index 610b96a1202cdbf17c1b930d8b432e2262f5ffd3..addc5c73df0fd909d6e8e3aa799b73028819f0b7 100644 (file)
@@ -144,6 +144,11 @@ static int handle_file(const char *path,
                fclose(out);
        if (sha1)
                SHA1_Final(sha1, &ctx);
+       if (hunk) {
+               if (output)
+                       unlink(output);
+               return error("Could not parse conflict hunks in %s", path);
+       }
        return hunk_no;
 }