Thread (6 messages) flat view 6 messages, 1 author, 2016-06-15
DORMANTno replies

[PATCH 2/5] git-rerere: detect unparsable conflicts

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:44:48
Subsystem: the rest · Maintainer: Linus Torvalds

rerere did not detect the case where <<< === >>> markers did not match.

Signed-off-by: Junio C Hamano <redacted>
---
 builtin-rerere.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/builtin-rerere.c b/builtin-rerere.c
index 610b96a..addc5c7 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;
 }
 
-- 
1.5.6.12.g73f03
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help