commit: convert commit_tree* to object_id
Convert the definitions and declarations of commit_tree and commit_tree_extended to use struct object_id and adjust all usages of these functions. Signed-off-by: Patryk Obara <patryk.obara@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
3b34934dca
commit
5078f34459
@ -820,8 +820,8 @@ static int merge_trivial(struct commit *head, struct commit_list *remoteheads)
|
||||
pptr = commit_list_append(head, pptr);
|
||||
pptr = commit_list_append(remoteheads->item, pptr);
|
||||
prepare_to_commit(remoteheads);
|
||||
if (commit_tree(merge_msg.buf, merge_msg.len, result_tree.hash, parents,
|
||||
result_commit.hash, NULL, sign_commit))
|
||||
if (commit_tree(merge_msg.buf, merge_msg.len, &result_tree, parents,
|
||||
&result_commit, NULL, sign_commit))
|
||||
die(_("failed to write commit object"));
|
||||
finish(head, remoteheads, &result_commit, "In-index merge");
|
||||
drop_save();
|
||||
@ -845,8 +845,8 @@ static int finish_automerge(struct commit *head,
|
||||
commit_list_insert(head, &parents);
|
||||
strbuf_addch(&merge_msg, '\n');
|
||||
prepare_to_commit(remoteheads);
|
||||
if (commit_tree(merge_msg.buf, merge_msg.len, result_tree->hash, parents,
|
||||
result_commit.hash, NULL, sign_commit))
|
||||
if (commit_tree(merge_msg.buf, merge_msg.len, result_tree, parents,
|
||||
&result_commit, NULL, sign_commit))
|
||||
die(_("failed to write commit object"));
|
||||
strbuf_addf(&buf, "Merge made by the '%s' strategy.", wt_strategy);
|
||||
finish(head, remoteheads, &result_commit, buf.buf);
|
||||
|
Reference in New Issue
Block a user