aboutsummaryrefslogtreecommitdiffstats
path: root/merge-ll.c
diff options
context:
space:
mode:
authorPhillip Wood <phillip.wood@dunelm.org.uk>2024-03-14 17:05:05 +0000
committerJunio C Hamano <gitster@pobox.com>2024-03-14 10:08:52 -0700
commit135cc712c39fa7ccf25b9b2b55d1d07fc85c85a4 (patch)
tree5a70d7731d848657bf9f8e0cc133effd0f14b297 /merge-ll.c
parent412aff7b3379b182e3331ec66c0657ae4e39d576 (diff)
downloadgit-135cc712c39fa7ccf25b9b2b55d1d07fc85c85a4.tar.gz
merge options: add a conflict style member
Add a conflict_style member to `struct merge_options` and `struct ll_merge_options` to allow callers to override the default conflict style. This will be used in the next commit. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'merge-ll.c')
-rw-r--r--merge-ll.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/merge-ll.c b/merge-ll.c
index ef200e4497..34514e8bc6 100644
--- a/merge-ll.c
+++ b/merge-ll.c
@@ -128,7 +128,9 @@ static enum ll_merge_result ll_xdl_merge(const struct ll_merge_driver *drv_unuse
xmp.level = XDL_MERGE_ZEALOUS;
xmp.favor = opts->variant;
xmp.xpp.flags = opts->xdl_opts;
- if (git_xmerge_style >= 0)
+ if (opts->conflict_style >= 0)
+ xmp.style = opts->conflict_style;
+ else if (git_xmerge_style >= 0)
xmp.style = git_xmerge_style;
if (marker_size > 0)
xmp.marker_size = marker_size;