]> git.ipfire.org Git - thirdparty/git.git/blobdiff - commit.h
alloc: allow arbitrary repositories for alloc functions
[thirdparty/git.git] / commit.h
index 425f4027752fb47190a53ddc72a64ebf9d928633..2d764ab7d8e63536e06a83d78a13952fc8b7ebbe 100644 (file)
--- a/commit.h
+++ b/commit.h
@@ -99,6 +99,12 @@ void unuse_commit_buffer(const struct commit *, const void *buffer);
  */
 void free_commit_buffer(struct commit *);
 
+/*
+ * Release memory related to a commit, including the parent list and
+ * any cached object buffer.
+ */
+void release_commit_memory(struct commit *c);
+
 /*
  * Disassociate any cached object buffer from the commit, but do not free it.
  * The buffer (or NULL, if none) is returned.
@@ -262,14 +268,15 @@ extern void append_merge_tag_headers(struct commit_list *parents,
                                     struct commit_extra_header ***tail);
 
 extern int commit_tree(const char *msg, size_t msg_len,
-                      const unsigned char *tree,
-                      struct commit_list *parents, unsigned char *ret,
+                      const struct object_id *tree,
+                      struct commit_list *parents, struct object_id *ret,
                       const char *author, const char *sign_commit);
 
 extern int commit_tree_extended(const char *msg, size_t msg_len,
-                               const unsigned char *tree,
-                               struct commit_list *parents, unsigned char *ret,
-                               const char *author, const char *sign_commit,
+                               const struct object_id *tree,
+                               struct commit_list *parents,
+                               struct object_id *ret, const char *author,
+                               const char *sign_commit,
                                struct commit_extra_header *);
 
 extern struct commit_extra_header *read_commit_extra_headers(struct commit *, const char **);