diff options
| author | Antonin Delpeuch <antonin@delpeuch.eu> | 2024-07-13 16:51:46 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-07-13 18:10:49 -0700 |
| commit | 9c93ba4d0aee1bc8c663a13552afd2b2c22863a9 (patch) | |
| tree | fbbc5fb0bcfd9fdecf3a5eee51fa76bea18225a5 /merge-recursive.h | |
| parent | The ninteenth batch (diff) | |
| download | git-9c93ba4d0aee1bc8c663a13552afd2b2c22863a9.tar.gz git-9c93ba4d0aee1bc8c663a13552afd2b2c22863a9.zip | |
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 'merge-recursive.h')
| -rw-r--r-- | merge-recursive.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/merge-recursive.h b/merge-recursive.h index 3136c7cc2d..0b91f28f90 100644 --- a/merge-recursive.h +++ b/merge-recursive.h @@ -54,7 +54,10 @@ struct merge_options { struct merge_options_internal *priv; }; -void init_merge_options(struct merge_options *opt, struct repository *repo); +/* for use by porcelain commands */ +void init_ui_merge_options(struct merge_options *opt, struct repository *repo); +/* for use by plumbing commands */ +void init_basic_merge_options(struct merge_options *opt, struct repository *repo); void copy_merge_options(struct merge_options *dst, struct merge_options *src); void clear_merge_options(struct merge_options *opt); |
