summaryrefslogtreecommitdiff
path: root/include/git2
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2015-03-17 10:06:50 -0400
committerEdward Thomson <ethomson@edwardthomson.com>2015-03-17 10:06:50 -0400
commit7800048afbb002d0003b54fcc09c98d0d3249949 (patch)
treec68b437313065b3a46c987bd2983f6a511f28194 /include/git2
parent828e595969efee951d67f23cfd9f4b8461ce71fb (diff)
parente68b31a1a9f338908a4c72d48734b30c303f0901 (diff)
downloadlibgit2-7800048afbb002d0003b54fcc09c98d0d3249949.tar.gz
Merge pull request #2972 from libgit2/cmn/pack-objects-walk
[WIP] Smarter pack-building
Diffstat (limited to 'include/git2')
-rw-r--r--include/git2/pack.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/git2/pack.h b/include/git2/pack.h
index e7f060d12..4cf426273 100644
--- a/include/git2/pack.h
+++ b/include/git2/pack.h
@@ -115,6 +115,19 @@ GIT_EXTERN(int) git_packbuilder_insert_tree(git_packbuilder *pb, const git_oid *
GIT_EXTERN(int) git_packbuilder_insert_commit(git_packbuilder *pb, const git_oid *id);
/**
+ * Insert objects as given by the walk
+ *
+ * Those commits and all objects they reference will be inserted into
+ * the packbuilder.
+ *
+ * @param pb the packbuilder
+ * @param walk the revwalk to use to fill the packbuilder
+ *
+ * @return 0 or an error code
+ */
+GIT_EXTERN(int) git_packbuilder_insert_walk(git_packbuilder *pb, git_revwalk *walk);
+
+/**
* Write the contents of the packfile to an in-memory buffer
*
* The contents of the buffer will become a valid packfile, even though there