commit 9f98de9c4993b8b5ae95cedf9b1d916f6618a887 from: Stefan Sperling date: Fri Feb 08 11:18:15 2019 UTC declare got_merge_diff3() commit - 5a3ad9e051c99696dd2552a566a4fcea06a2f227 commit + 9f98de9c4993b8b5ae95cedf9b1d916f6618a887 blob - 3132fbc7db7c4b40573a1f04546bb62df2d0c1f0 blob + d0a238ecfb0c80353bfc973c70e2d206a5e00016 --- lib/diff3.c +++ lib/diff3.c @@ -88,10 +88,6 @@ #ifndef nitems #define nitems(_a) (sizeof(_a) / sizeof((_a)[0])) #endif - -/* flags shared between merge(1) and rcsmerge(1) */ -#define MERGE_EFLAG (1<<16) -#define MERGE_OFLAG (1<<17) /* diff3 - 3-way differential file comparison */ @@ -265,7 +261,7 @@ done: * For merge(1). */ const struct got_error * -merge_diff3(int outfd, char *p1, char *p2, char *p3, int flags) +got_merge_diff3(int outfd, const char *p1, const char *p2, const char *p3) { const struct got_error *err = NULL; char *dp13, *dp23, *path1, *path2, *path3; @@ -285,9 +281,6 @@ merge_diff3(int outfd, char *p1, char *p2, char *p3, i b1 = b2 = b3 = d1 = d2 = diffb = NULL; dp13 = dp23 = path1 = path2 = path3 = NULL; data = patch = NULL; - - if ((flags & MERGE_EFLAG) && !(flags & MERGE_OFLAG)) - d3s->oflag = 0; if ((b1 = buf_load(p1)) == NULL) goto out; blob - edd86728a178db457f85a6e72a474b60e45a6788 blob + cb4b54557f2386890197a86fa4ed3bcbe29241ff --- lib/got_lib_diff.h +++ lib/got_lib_diff.h @@ -139,3 +139,6 @@ const struct got_error *got_diffreg(int *, FILE *, const struct got_error *got_diff_blob_lines_changed(struct got_diff_changes **, struct got_blob_object *, struct got_blob_object *); void got_diff_free_changes(struct got_diff_changes *); + +const struct got_error *got_merge_diff3(int, const char *, const char *, + const char *);