merge-recursive: fix some overly long lines

No substantive code change, just add some line breaks to fix lines that have grown in length due to various refactorings. Most remaining lines of excessive length in merge-recursive include error messages and it's not clear that splitting those improves things. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Elijah Newren committed Aug 17, 2019 at 11:41 UTC 4d7101e25cfd5fba24ddc310f10c3962edba8b4d
1 file changed +13 -6
merge-recursive.c
+13 -6
@@ -681,7 +681,9 @@ static void add_flattened_path(struct strbuf *out, const char *s)
681 out->buf[i] = '_';
682 }
683
684 -static char *unique_path(struct merge_options *opt, const char *path, const char *branch)
684 +static char *unique_path(struct merge_options *opt,
685 + const char *path,
686 + const char *branch)
687 {
688 struct path_hashmap_entry *entry;
689 struct strbuf newpath = STRBUF_INIT;
@@ -915,7 +917,8 @@ static int update_file_flags(struct merge_options *opt,
917 }
918 if (S_ISREG(contents->mode)) {
919 struct strbuf strbuf = STRBUF_INIT;
918 - if (convert_to_working_tree(opt->repo->index, path, buf, size, &strbuf)) {
920 + if (convert_to_working_tree(opt->repo->index,
921 + path, buf, size, &strbuf)) {
922 free(buf);
923 size = strbuf.len;
924 buf = strbuf_detach(&strbuf, NULL);
@@ -3393,7 +3396,8 @@ static int merge_trees_internal(struct merge_options *opt,
3396 * opposed to decaring a local hashmap is for convenience
3397 * so that we don't have to pass it to around.
3398 */
3396 - hashmap_init(&opt->current_file_dir_set, path_hashmap_cmp, NULL, 512);
3399 + hashmap_init(&opt->current_file_dir_set, path_hashmap_cmp,
3400 + NULL, 512);
3401 get_files_dirs(opt, head);
3402 get_files_dirs(opt, merge);
3403
@@ -3502,7 +3506,8 @@ static int merge_recursive_internal(struct merge_options *opt,
3506 struct tree *tree;
3507
3508 tree = lookup_tree(opt->repo, opt->repo->hash_algo->empty_tree);
3505 - merged_common_ancestors = make_virtual_commit(opt->repo, tree, "ancestor");
3509 + merged_common_ancestors = make_virtual_commit(opt->repo,
3510 + tree, "ancestor");
3511 ancestor_name = "empty tree";
3512 } else if (ca) {
3513 ancestor_name = "merged common ancestors";
@@ -3625,7 +3630,8 @@ int merge_recursive(struct merge_options *opt,
3630 return clean;
3631 }
3632
3628 -static struct commit *get_ref(struct repository *repo, const struct object_id *oid,
3633 +static struct commit *get_ref(struct repository *repo,
3634 + const struct object_id *oid,
3635 const char *name)
3636 {
3637 struct object *object;
@@ -3660,7 +3666,8 @@ int merge_recursive_generic(struct merge_options *opt,
3666 int i;
3667 for (i = 0; i < num_base_list; ++i) {
3668 struct commit *base;
3663 - if (!(base = get_ref(opt->repo, base_list[i], oid_to_hex(base_list[i]))))
3669 + if (!(base = get_ref(opt->repo, base_list[i],
3670 + oid_to_hex(base_list[i]))))
3671 return err(opt, _("Could not parse object '%s'"),
3672 oid_to_hex(base_list[i]));
3673 commit_list_insert(base, &ca);