Commit Diff


commit - 3165301c5af64176c55b5c4c7dbfab343106e3e9
commit + 01a44956166c76e44f58809e5a1ea1477adfef80
blob - afc751faf58a09c1340a372d99e9f4faeaebfb11
blob + a2506ec7ba196408a1cdebbeb132c449b2d5032f
--- lib/diff3.c
+++ lib/diff3.c
@@ -423,11 +423,13 @@ diff3_internal(char *dp13, char *dp23, char *path1, ch
 	ssize_t m, n;
 	int i;
 
-	i = snprintf(d3s->f1mark, sizeof(d3s->f1mark), "<<<<<<< %s", label1);
+	i = snprintf(d3s->f1mark, sizeof(d3s->f1mark),
+	    "%s %s", GOT_DIFF_CONFLICT_MARKER_BEGIN, label1);
 	if (i < 0 || i >= (int)sizeof(d3s->f1mark))
 		return got_error(GOT_ERR_NO_SPACE);
 
-	i = snprintf(d3s->f3mark, sizeof(d3s->f3mark), ">>>>>>> %s", label3);
+	i = snprintf(d3s->f3mark, sizeof(d3s->f3mark),
+	    "%s %s", GOT_DIFF_CONFLICT_MARKER_END, label3);
 	if (i < 0 || i >= (int)sizeof(d3s->f3mark))
 		return got_error(GOT_ERR_NO_SPACE);
 
@@ -943,8 +945,8 @@ edscript(int n, struct diff3_state *d3s)
 		if (!d3s->oflag || !d3s->overlap[n])
 			prange(&d3s->de[n].old, d3s);
 		else
-			diff_output(d3s->diffbuf, "%da\n=======\n",
-			    d3s->de[n].old.to -1);
+			diff_output(d3s->diffbuf, "%da\n%s\n",
+			    d3s->de[n].old.to -1, GOT_DIFF_CONFLICT_MARKER_SEP);
 		(void)fseek(d3s->fp[2], (long)d3s->de[n].new.from, SEEK_SET);
 		k = d3s->de[n].new.to - d3s->de[n].new.from;
 		for (; k > 0; k-= j) {
blob - 66906a1b1f3beff3ef0f12437995a1d63c08ed99
blob + b8fe79b227efaf7231763dafa65b8c766be7ef0d
--- lib/got_lib_diff.h
+++ lib/got_lib_diff.h
@@ -132,6 +132,10 @@ struct got_diff_args {
 	const char *label[2];
 };
 
+#define GOT_DIFF_CONFLICT_MARKER_BEGIN	"<<<<<<<"
+#define GOT_DIFF_CONFLICT_MARKER_SEP	"======="
+#define GOT_DIFF_CONFLICT_MARKER_END	">>>>>>>"
+
 const struct got_error *got_diffreg(int *, FILE *,
     FILE *, int, struct got_diff_args *, struct got_diff_state *, FILE *,
     struct got_diff_changes *);