diff options
author | Junio C Hamano <gitster@pobox.com> | 2024-04-01 22:21:33 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-04-01 22:21:33 +0200 |
commit | ccdc7d98bb39aad1dc1bc78357a763d10fe14ddb (patch) | |
tree | 34fde699f6ff8d34ee660fc616eade80242baa4f /merge-ll.c | |
parent | The twelfth batch (diff) | |
parent | checkout: fix interaction between --conflict and --merge (diff) | |
download | git-ccdc7d98bb39aad1dc1bc78357a763d10fe14ddb.tar.xz git-ccdc7d98bb39aad1dc1bc78357a763d10fe14ddb.zip |
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.c | 6 |
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; |