From 560119b9abfa39504c93ed08735426dae947d5a9 Mon Sep 17 00:00:00 2001 From: Bert Wesarg Date: Mon, 1 Mar 2010 22:46:26 +0100 Subject: refactor merge flags into xmparam_t Include the merge level, favor, and style flags into the xmparam_t struct. This removes the bit twiddling with these three values into the one flags parameter. Signed-off-by: Bert Wesarg Signed-off-by: Junio C Hamano --- ll-merge.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'll-merge.c') diff --git a/ll-merge.c b/ll-merge.c index a4b2f4c96..82c7742e4 100644 --- a/ll-merge.c +++ b/ll-merge.c @@ -63,8 +63,6 @@ static int ll_xdl_merge(const struct ll_merge_driver *drv_unused, int flag, int marker_size) { xmparam_t xmp; - int style = 0; - int favor = (flag >> 1) & 03; if (buffer_is_binary(orig->ptr, orig->size) || buffer_is_binary(src1->ptr, src1->size) || @@ -79,15 +77,13 @@ static int ll_xdl_merge(const struct ll_merge_driver *drv_unused, } memset(&xmp, 0, sizeof(xmp)); + xmp.level = XDL_MERGE_ZEALOUS; + xmp.favor= (flag >> 1) & 03; if (git_xmerge_style >= 0) - style = git_xmerge_style; + xmp.style = git_xmerge_style; if (marker_size > 0) xmp.marker_size = marker_size; - return xdl_merge(orig, - src1, name1, - src2, name2, - &xmp, XDL_MERGE_FLAGS(XDL_MERGE_ZEALOUS, style, favor), - result); + return xdl_merge(orig, src1, name1, src2, name2, &xmp, result); } static int ll_union_merge(const struct ll_merge_driver *drv_unused, -- cgit v1.2.1