From b4b935d8abd52e00f08518f39b6c59aab73926ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn=20Nieto?= Date: Wed, 31 Oct 2012 10:43:08 +0100 Subject: packbuilder: add accessors for the number of total and written objects --- include/git2/pack.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'include/git2/pack.h') diff --git a/include/git2/pack.h b/include/git2/pack.h index 7e28a67e8..94d5fc6a1 100644 --- a/include/git2/pack.h +++ b/include/git2/pack.h @@ -87,6 +87,20 @@ GIT_EXTERN(int) git_packbuilder_write(git_packbuilder *pb, const char *file); */ GIT_EXTERN(int) git_packbuilder_foreach(git_packbuilder *pb, int (*cb)(void *buf, size_t size, void *data), void *data); +/** + * Get the total number of objects the packbuilder will write out + * + * @param pb the packbuilder + */ +GIT_EXTERN(uint32_t) git_packbuilder_object_count(git_packbuilder *pb); + +/** + * Get the number of objects the packbuilder has already written out + * + * @param pb the packbuilder + */ +GIT_EXTERN(uint32_t) git_packbuilder_written(git_packbuilder *pb); + /** * Free the packbuilder and all associated data * -- cgit v1.2.1