diff options
Diffstat (limited to 'll-merge.c')
-rw-r--r-- | ll-merge.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/ll-merge.c b/ll-merge.c index 1ec0b959e0..261657578c 100644 --- a/ll-merge.c +++ b/ll-merge.c @@ -91,7 +91,9 @@ static int ll_binary_merge(const struct ll_merge_driver *drv_unused, * With -Xtheirs or -Xours, we have cleanly merged; * otherwise we got a conflict. */ - return (opts->variant ? 0 : 1); + return opts->variant == XDL_MERGE_FAVOR_OURS || + opts->variant == XDL_MERGE_FAVOR_THEIRS ? + 0 : 1; } static int ll_xdl_merge(const struct ll_merge_driver *drv_unused, @@ -136,7 +138,7 @@ static int ll_xdl_merge(const struct ll_merge_driver *drv_unused, static int ll_union_merge(const struct ll_merge_driver *drv_unused, mmbuffer_t *result, - const char *path_unused, + const char *path, mmfile_t *orig, const char *orig_name, mmfile_t *src1, const char *name1, mmfile_t *src2, const char *name2, @@ -148,8 +150,8 @@ static int ll_union_merge(const struct ll_merge_driver *drv_unused, assert(opts); o = *opts; o.variant = XDL_MERGE_FAVOR_UNION; - return ll_xdl_merge(drv_unused, result, path_unused, - orig, NULL, src1, NULL, src2, NULL, + return ll_xdl_merge(drv_unused, result, path, + orig, orig_name, src1, name1, src2, name2, &o, marker_size); } @@ -268,7 +270,7 @@ static int read_merge_config(const char *var, const char *value, void *cb) if (!strncmp(fn->name, name, namelen) && !fn->name[namelen]) break; if (!fn) { - fn = xcalloc(1, sizeof(struct ll_merge_driver)); + CALLOC_ARRAY(fn, 1); fn->name = xmemdupz(name, namelen); fn->fn = ll_ext_merge; *ll_user_merge_tail = fn; |