summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorVicent Martí <vicent@github.com>2013-05-27 06:15:28 -0700
committerVicent Martí <vicent@github.com>2013-05-27 06:15:28 -0700
commit8baca134cc21b5eef18e3d47d50ed55f633b57d1 (patch)
treec60937f5fb94cab89c83cd007d449b6db91a1ded /include
parent63908cee27e85949130f9b0a187c316f1d98b3a2 (diff)
parent563c19a9ce556301e642a508e53598faf3c8935a (diff)
downloadlibgit2-8baca134cc21b5eef18e3d47d50ed55f633b57d1.tar.gz
Merge pull request #1614 from schu/packbuilder-write
packbuilder: also write index in git_packbuilder_write
Diffstat (limited to 'include')
-rw-r--r--include/git2/pack.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/include/git2/pack.h b/include/git2/pack.h
index 5e431e62d..242bddd25 100644
--- a/include/git2/pack.h
+++ b/include/git2/pack.h
@@ -107,14 +107,20 @@ 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);
/**
- * Write the new pack and the corresponding index to path
+ * Write the new pack and corresponding index file to path.
*
* @param pb The packbuilder
- * @param path Directory to store the new pack and index
+ * @param path to the directory where the packfile and index should be stored
+ * @param progress_cb function to call with progress information from the indexer (optional)
+ * @param progress_payload payload for the progress callback (optional)
*
* @return 0 or an error code
*/
-GIT_EXTERN(int) git_packbuilder_write(git_packbuilder *pb, const char *file);
+GIT_EXTERN(int) git_packbuilder_write(
+ git_packbuilder *pb,
+ const char *path,
+ git_transfer_progress_callback progress_cb,
+ void *progress_cb_payload);
typedef int (*git_packbuilder_foreach_cb)(void *buf, size_t size, void *payload);
/**