Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'notes-merge.c')
-rw-r--r--notes-merge.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/notes-merge.c b/notes-merge.c
index 4352c34a6e..c09c5e0e47 100644
--- a/notes-merge.c
+++ b/notes-merge.c
@@ -125,7 +125,7 @@ static struct notes_merge_pair *diff_tree_remote(struct notes_merge_options *o,
oid_to_hex(base), oid_to_hex(remote));
diff_setup(&opt);
- DIFF_OPT_SET(&opt, RECURSIVE);
+ opt.flags.recursive = 1;
opt.output_format = DIFF_FORMAT_NO_OUTPUT;
diff_setup_done(&opt);
diff_tree_oid(base, remote, "", &opt);
@@ -188,7 +188,7 @@ static void diff_tree_local(struct notes_merge_options *o,
len, oid_to_hex(base), oid_to_hex(local));
diff_setup(&opt);
- DIFF_OPT_SET(&opt, RECURSIVE);
+ opt.flags.recursive = 1;
opt.output_format = DIFF_FORMAT_NO_OUTPUT;
diff_setup_done(&opt);
diff_tree_oid(base, local, "", &opt);
@@ -547,7 +547,7 @@ int notes_merge(struct notes_merge_options *o,
o->local_ref, o->remote_ref);
/* Dereference o->local_ref into local_sha1 */
- if (read_ref_full(o->local_ref, 0, local_oid.hash, NULL))
+ if (read_ref_full(o->local_ref, 0, &local_oid, NULL))
die("Failed to resolve local notes ref '%s'", o->local_ref);
else if (!check_refname_format(o->local_ref, 0) &&
is_null_oid(&local_oid))
@@ -595,7 +595,7 @@ int notes_merge(struct notes_merge_options *o,
bases = get_merge_bases(local, remote);
if (!bases) {
base_oid = &null_oid;
- base_tree_oid = &empty_tree_oid;
+ base_tree_oid = the_hash_algo->empty_tree;
if (o->verbosity >= 4)
printf("No merge base found; doing history-less merge\n");
} else if (!bases->next) {
@@ -642,9 +642,8 @@ int notes_merge(struct notes_merge_options *o,
struct commit_list *parents = NULL;
commit_list_insert(remote, &parents); /* LIFO order */
commit_list_insert(local, &parents);
- create_notes_commit(local_tree, parents,
- o->commit_msg.buf, o->commit_msg.len,
- result_oid->hash);
+ create_notes_commit(local_tree, parents, o->commit_msg.buf,
+ o->commit_msg.len, result_oid);
}
found_result:
@@ -718,8 +717,8 @@ int notes_merge_commit(struct notes_merge_options *o,
strbuf_setlen(&path, baselen);
}
- create_notes_commit(partial_tree, partial_commit->parents,
- msg, strlen(msg), result_oid->hash);
+ create_notes_commit(partial_tree, partial_commit->parents, msg,
+ strlen(msg), result_oid);
unuse_commit_buffer(partial_commit, buffer);
if (o->verbosity >= 4)
printf("Finalized notes merge commit: %s\n",