summaryrefslogtreecommitdiff
path: root/merge-recursive.c
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2019-08-17 18:41:39 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-08-19 17:08:04 (GMT)
commita779fb829bf6160cb519500ac1e15d8ab8a247a4 (patch)
tree7d12bc458bf26dc5b9d90c10e55282ce2e86c8e7 /merge-recursive.c
parent8599ab4574ce3a8b2fc894c7cfdac8fd61450b7b (diff)
downloadgit-a779fb829bf6160cb519500ac1e15d8ab8a247a4.zip
git-a779fb829bf6160cb519500ac1e15d8ab8a247a4.tar.gz
git-a779fb829bf6160cb519500ac1e15d8ab8a247a4.tar.bz2
merge-recursive: comment and reorder the merge_options fields
The merge_options struct had lots of fields, making it a little imposing, but the options naturally fall into multiple different groups. Grouping similar options and adding a comment or two makes it easier to read, easier for new folks to figure out which options are related, and thus easier for them to find the options they need. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'merge-recursive.c')
-rw-r--r--merge-recursive.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/merge-recursive.c b/merge-recursive.c
index 0f0b952..43dec33 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -3754,21 +3754,27 @@ void init_merge_options(struct merge_options *opt,
{
const char *merge_verbosity;
memset(opt, 0, sizeof(struct merge_options));
+
opt->repo = repo;
+
+ opt->detect_renames = -1;
+ opt->detect_directory_renames = MERGE_DIRECTORY_RENAMES_CONFLICT;
+ opt->rename_limit = -1;
+
opt->verbosity = 2;
opt->buffer_output = 1;
- opt->rename_limit = -1;
+ strbuf_init(&opt->obuf, 0);
+
opt->renormalize = 0;
- opt->detect_renames = -1;
- opt->detect_directory_renames = MERGE_DIRECTORY_RENAMES_CONFLICT;
+
+ string_list_init(&opt->df_conflict_file_set, 1);
+
merge_recursive_config(opt);
merge_verbosity = getenv("GIT_MERGE_VERBOSITY");
if (merge_verbosity)
opt->verbosity = strtol(merge_verbosity, NULL, 10);
if (opt->verbosity >= 5)
opt->buffer_output = 0;
- strbuf_init(&opt->obuf, 0);
- string_list_init(&opt->df_conflict_file_set, 1);
}
int parse_merge_opt(struct merge_options *opt, const char *s)