summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2019-08-17 18:41:33 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-08-19 17:08:03 (GMT)
commit4d7101e25cfd5fba24ddc310f10c3962edba8b4d (patch)
treedaf1e8a7651629021e1e6b4ed60dceceeded9c59
parent724dd767b245db588840d7e9dbd46687ee84020b (diff)
downloadgit-4d7101e25cfd5fba24ddc310f10c3962edba8b4d.zip
git-4d7101e25cfd5fba24ddc310f10c3962edba8b4d.tar.gz
git-4d7101e25cfd5fba24ddc310f10c3962edba8b4d.tar.bz2
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>
-rw-r--r--merge-recursive.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/merge-recursive.c b/merge-recursive.c
index ae50935..720678c 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -681,7 +681,9 @@ static void add_flattened_path(struct strbuf *out, const char *s)
out->buf[i] = '_';
}
-static char *unique_path(struct merge_options *opt, const char *path, const char *branch)
+static char *unique_path(struct merge_options *opt,
+ const char *path,
+ const char *branch)
{
struct path_hashmap_entry *entry;
struct strbuf newpath = STRBUF_INIT;
@@ -915,7 +917,8 @@ static int update_file_flags(struct merge_options *opt,
}
if (S_ISREG(contents->mode)) {
struct strbuf strbuf = STRBUF_INIT;
- if (convert_to_working_tree(opt->repo->index, path, buf, size, &strbuf)) {
+ if (convert_to_working_tree(opt->repo->index,
+ path, buf, size, &strbuf)) {
free(buf);
size = strbuf.len;
buf = strbuf_detach(&strbuf, NULL);
@@ -3393,7 +3396,8 @@ static int merge_trees_internal(struct merge_options *opt,
* opposed to decaring a local hashmap is for convenience
* so that we don't have to pass it to around.
*/
- hashmap_init(&opt->current_file_dir_set, path_hashmap_cmp, NULL, 512);
+ hashmap_init(&opt->current_file_dir_set, path_hashmap_cmp,
+ NULL, 512);
get_files_dirs(opt, head);
get_files_dirs(opt, merge);
@@ -3502,7 +3506,8 @@ static int merge_recursive_internal(struct merge_options *opt,
struct tree *tree;
tree = lookup_tree(opt->repo, opt->repo->hash_algo->empty_tree);
- merged_common_ancestors = make_virtual_commit(opt->repo, tree, "ancestor");
+ merged_common_ancestors = make_virtual_commit(opt->repo,
+ tree, "ancestor");
ancestor_name = "empty tree";
} else if (ca) {
ancestor_name = "merged common ancestors";
@@ -3625,7 +3630,8 @@ int merge_recursive(struct merge_options *opt,
return clean;
}
-static struct commit *get_ref(struct repository *repo, const struct object_id *oid,
+static struct commit *get_ref(struct repository *repo,
+ const struct object_id *oid,
const char *name)
{
struct object *object;
@@ -3660,7 +3666,8 @@ int merge_recursive_generic(struct merge_options *opt,
int i;
for (i = 0; i < num_base_list; ++i) {
struct commit *base;
- if (!(base = get_ref(opt->repo, base_list[i], oid_to_hex(base_list[i]))))
+ if (!(base = get_ref(opt->repo, base_list[i],
+ oid_to_hex(base_list[i]))))
return err(opt, _("Could not parse object '%s'"),
oid_to_hex(base_list[i]));
commit_list_insert(base, &ca);