summaryrefslogtreecommitdiff
path: root/builtin/merge-tree.c
diff options
context:
space:
mode:
authorAntonin Delpeuch <antonin@delpeuch.eu>2024-07-13 16:51:46 +0000
committerJunio C Hamano <gitster@pobox.com>2024-07-13 18:10:49 -0700
commit9c93ba4d0aee1bc8c663a13552afd2b2c22863a9 (patch)
treefbbc5fb0bcfd9fdecf3a5eee51fa76bea18225a5 /builtin/merge-tree.c
parent557ae147e6cdc9db121269b058c757ac5092f9c9 (diff)
merge-recursive: honor diff.algorithm
The documentation claims that "recursive defaults to the diff.algorithm config setting", but this is currently not the case. This fixes it, ensuring that diff.algorithm is used when -Xdiff-algorithm is not supplied. This affects the following porcelain commands: "merge", "rebase", "cherry-pick", "pull", "stash", "log", "am" and "checkout". It also affects the "merge-tree" ancillary interrogator. This change refactors the initialization of merge options to introduce two functions, "init_merge_ui_options" and "init_merge_basic_options" instead of just one "init_merge_options". This design follows the approach used in diff.c, providing initialization methods for porcelain and plumbing commands respectively. Thanks to that, the "replay" and "merge-recursive" plumbing commands remain unaffected by diff.algorithm. Signed-off-by: Antonin Delpeuch <antonin@delpeuch.eu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/merge-tree.c')
-rw-r--r--builtin/merge-tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/merge-tree.c b/builtin/merge-tree.c
index dab2fdc2a6..9bca9b5f33 100644
--- a/builtin/merge-tree.c
+++ b/builtin/merge-tree.c
@@ -571,7 +571,7 @@ int cmd_merge_tree(int argc, const char **argv, const char *prefix)
};
/* Init merge options */
- init_merge_options(&o.merge_options, the_repository);
+ init_ui_merge_options(&o.merge_options, the_repository);
/* Parse arguments */
original_argc = argc - 1; /* ignoring argv[0] */