aboutsummaryrefslogtreecommitdiffstats
path: root/merge-ll.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-04-01 13:21:33 -0700
committerJunio C Hamano <gitster@pobox.com>2024-04-01 13:21:33 -0700
commitccdc7d98bb39aad1dc1bc78357a763d10fe14ddb (patch)
tree34fde699f6ff8d34ee660fc616eade80242baa4f /merge-ll.c
parentd6fd04375f9196f8b203d442f235bd96a1a068cc (diff)
parent5a99c1ac1a9640f7ee0374e9b90523f500bdbb5a (diff)
downloadgit-ccdc7d98bb39aad1dc1bc78357a763d10fe14ddb.tar.gz
Merge branch 'pw/checkout-conflict-errorfix'
"git checkout --conflict=bad" reported a bad conflictStyle as if it were given to a configuration variable; it has been corrected to report that the command line option is bad. * pw/checkout-conflict-errorfix: checkout: fix interaction between --conflict and --merge checkout: cleanup --conflict=<style> parsing merge options: add a conflict style member merge-ll: introduce LL_MERGE_OPTIONS_INIT xdiff-interface: refactor parsing of merge.conflictstyle
Diffstat (limited to 'merge-ll.c')
-rw-r--r--merge-ll.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/merge-ll.c b/merge-ll.c
index 61e0ae5398..bf1077ae09 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;
@@ -401,7 +403,7 @@ enum ll_merge_result ll_merge(mmbuffer_t *result_buf,
const struct ll_merge_options *opts)
{
struct attr_check *check = load_merge_attributes();
- static const struct ll_merge_options default_opts;
+ static const struct ll_merge_options default_opts = LL_MERGE_OPTIONS_INIT;
const char *ll_driver_name = NULL;
int marker_size = DEFAULT_CONFLICT_MARKER_SIZE;
const struct ll_merge_driver *driver;