provide a helper to set the commit buffer
[gitweb.git] / commit.h
index d72ed4334049b161116d945bfdbc08d59068ce1a..cc89128894d2514ff70e5d46bc149c95b44a7760 100644 (file)
--- a/commit.h
+++ b/commit.h
@@ -51,6 +51,12 @@ int parse_commit_buffer(struct commit *item, const void *buffer, unsigned long s
 int parse_commit(struct commit *item);
 void parse_commit_or_die(struct commit *item);
 
+/*
+ * Associate an object buffer with the commit. The ownership of the
+ * memory is handed over to the commit, and must be free()-able.
+ */
+void set_commit_buffer(struct commit *, void *buffer);
+
 /*
  * Free any cached object buffer associated with the commit.
  */