builtin/notes.c: Refactor creation of notes commits.
[gitweb.git] / notes-merge.h
index fd572ac35cae981c71d6ad4340336a4b4ff0d7fa..49e1b3a0f2fb1386b3c608e9b5df7f5d7e7586c1 100644 (file)
@@ -14,6 +14,20 @@ struct notes_merge_options {
 
 void init_notes_merge_options(struct notes_merge_options *o);
 
+/*
+ * 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 char *msg, unsigned char *result_sha1);
+
 /*
  * Merge notes from o->remote_ref into o->local_ref
  *