From bf9a05ba46a9d464424d22482aaa54abdd28b77d Mon Sep 17 00:00:00 2001 From: Johan Herland Date: Wed, 12 Jun 2013 02:13:01 +0200 Subject: Move create_notes_commit() from notes-merge.c into notes-utils.c create_notes_commit() is needed by both the notes-merge code, and by commit_notes() in notes-utils. Since it is generally useful, and not bound to the notes-merge machinery, we move it from (the more specific) notes-merge to (the more general) notes-utils. Signed-off-by: Johan Herland Signed-off-by: Junio C Hamano --- notes-utils.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'notes-utils.h') diff --git a/notes-utils.h b/notes-utils.h index 0661e9990..b4cb1bfb4 100644 --- a/notes-utils.h +++ b/notes-utils.h @@ -3,6 +3,20 @@ #include "notes.h" +/* + * Create new notes commit from the given notes tree + * + * Properties of the created commit: + * - tree: the result of converting t to a tree object with write_notes_tree(). + * - parents: the given parents OR (if NULL) the commit referenced by t->ref. + * - author/committer: the default determined by commmit_tree(). + * - commit message: msg + * + * The resulting commit SHA1 is stored in result_sha1. + */ +void create_notes_commit(struct notes_tree *t, struct commit_list *parents, + const struct strbuf *msg, unsigned char *result_sha1); + void commit_notes(struct notes_tree *t, const char *msg); struct notes_rewrite_cfg { -- cgit v1.2.1