summaryrefslogtreecommitdiff
path: root/commit.h
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2014-06-10 17:40:14 -0400
committerJunio C Hamano <gitster@pobox.com>2014-06-13 12:08:17 -0700
commit66c2827ea4deb24ff541e30a5b6239ad5e9f6801 (patch)
treef18ee239e5cfe24ad5fed70b3e4836fe2aa63384 /commit.h
parent0fb370da9ca972f9571530f95c0dacb31368c280 (diff)
downloadgit-66c2827ea4deb24ff541e30a5b6239ad5e9f6801.tar.gz
provide a helper to set the commit buffer
Right now this is just a one-liner, but abstracting it will make it easier to change later. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.h')
-rw-r--r--commit.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/commit.h b/commit.h
index d72ed43340..cc89128894 100644
--- a/commit.h
+++ b/commit.h
@@ -52,6 +52,12 @@ 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.
*/
void free_commit_buffer(struct commit *);