summaryrefslogtreecommitdiff
path: root/builtin-rerere.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-06-22 00:21:28 -0700
committerJunio C Hamano <gitster@pobox.com>2008-06-22 00:54:40 -0700
commita1b32fdc3d1d05395f186bfa06e92174519dab8d (patch)
tree5ba298aaacd597fce76562b6b0ff23b22c03c52f /builtin-rerere.c
parent9022a495a3c407859560d4ac4a278c0d6ad58837 (diff)
downloadgit-a1b32fdc3d1d05395f186bfa06e92174519dab8d.tar.gz
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>
Diffstat (limited to 'builtin-rerere.c')
-rw-r--r--builtin-rerere.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/builtin-rerere.c b/builtin-rerere.c
index 610b96a120..addc5c73df 100644
--- a/builtin-rerere.c
+++ b/builtin-rerere.c
@@ -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;
}