summaryrefslogtreecommitdiff
path: root/include/git2/pack.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/git2/pack.h')
-rw-r--r--include/git2/pack.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/git2/pack.h b/include/git2/pack.h
index 748817666..4632699d1 100644
--- a/include/git2/pack.h
+++ b/include/git2/pack.h
@@ -130,6 +130,16 @@ GIT_EXTERN(int) git_packbuilder_write(
git_transfer_progress_callback progress_cb,
void *progress_cb_payload);
+/**
+* Get the packfile's hash
+*
+* A packfile's name is derived from the sorted hashing of all object
+* names. This is only correct after the packfile has been written.
+*
+* @param pb The packbuilder object
+*/
+GIT_EXTERN(const git_oid *) git_packbuilder_hash(git_packbuilder *pb);
+
typedef int (*git_packbuilder_foreach_cb)(void *buf, size_t size, void *payload);
/**
* Create the new pack and pass each object to the callback