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:
authorPatryk Obara <patryk.obara@gmail.com>2018-01-28 03:13:16 +0300
committerJunio C Hamano <gitster@pobox.com>2018-01-30 21:42:36 +0300
commit5078f344591ee3c454e64ff73e6563f0a3f14950 (patch)
tree9e6bbf35347208196ce5bd7cc1c9178a06a8464f /notes-utils.c
parent3b34934dcaa4e643a3691ba1f10db054adf60ffb (diff)
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>
Diffstat (limited to 'notes-utils.c')
-rw-r--r--notes-utils.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/notes-utils.c b/notes-utils.c
index 5c8e70c98f..058c642dac 100644
--- a/notes-utils.c
+++ b/notes-utils.c
@@ -6,7 +6,7 @@
void create_notes_commit(struct notes_tree *t, struct commit_list *parents,
const char *msg, size_t msg_len,
- unsigned char *result_sha1)
+ struct object_id *result_oid)
{
struct object_id tree_oid;
@@ -27,7 +27,8 @@ void create_notes_commit(struct notes_tree *t, struct commit_list *parents,
/* else: t->ref points to nothing, assume root/orphan commit */
}
- if (commit_tree(msg, msg_len, tree_oid.hash, parents, result_sha1, NULL, NULL))
+ if (commit_tree(msg, msg_len, &tree_oid, parents, result_oid, NULL,
+ NULL))
die("Failed to commit notes tree to database");
}
@@ -47,7 +48,7 @@ void commit_notes(struct notes_tree *t, const char *msg)
strbuf_addstr(&buf, msg);
strbuf_complete_line(&buf);
- create_notes_commit(t, NULL, buf.buf, buf.len, commit_oid.hash);
+ create_notes_commit(t, NULL, buf.buf, buf.len, &commit_oid);
strbuf_insert(&buf, 0, "notes: ", 7); /* commit message starts at index 7 */
update_ref(buf.buf, t->update_ref, &commit_oid, NULL, 0,
UPDATE_REFS_DIE_ON_ERR);