summaryrefslogtreecommitdiff
path: root/include/git2/pack.h
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@elego.de>2012-10-31 10:43:08 +0100
committerCarlos Martín Nieto <cmn@dwim.me>2012-11-01 06:21:49 +0100
commitb4b935d8abd52e00f08518f39b6c59aab73926ce (patch)
treebacf7297fa317c0a5197e578c5eb3c349f5d1ff7 /include/git2/pack.h
parent3dfed9cb86a54bc8266057ef62b99f5d889f4efc (diff)
downloadlibgit2-b4b935d8abd52e00f08518f39b6c59aab73926ce.tar.gz
packbuilder: add accessors for the number of total and written objects
Diffstat (limited to 'include/git2/pack.h')
-rw-r--r--include/git2/pack.h14
1 files changed, 14 insertions, 0 deletions
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
@@ -88,6 +88,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
*
* @param pb The packbuilder