aboutsummaryrefslogtreecommitdiff
path: root/ll-merge.c
diff options
context:
space:
mode:
authorBert Wesarg <bert.wesarg@googlemail.com>2010-03-01 22:46:26 +0100
committerJunio C Hamano <gitster@pobox.com>2010-03-02 11:51:48 -0800
commit560119b9abfa39504c93ed08735426dae947d5a9 (patch)
tree692dc5dd03e878f9650dfd0cc7c1d8b5c89e340d /ll-merge.c
parentcd1d61c44fb5c3d1c8e4c19becb66d90bbb9c676 (diff)
downloadgit-560119b9abfa39504c93ed08735426dae947d5a9.tar.gz
git-560119b9abfa39504c93ed08735426dae947d5a9.tar.xz
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 <bert.wesarg@googlemail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'll-merge.c')
-rw-r--r--ll-merge.c12
1 files changed, 4 insertions, 8 deletions
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,