From 66c2827ea4deb24ff541e30a5b6239ad5e9f6801 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Tue, 10 Jun 2014 17:40:14 -0400 Subject: 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 Signed-off-by: Junio C Hamano --- commit.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'commit.h') diff --git a/commit.h b/commit.h index d72ed4334..cc8912889 100644 --- 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. */ -- cgit v1.2.1