diff options
author | Michael Schubert <schu@schu.io> | 2013-05-11 11:36:29 +0200 |
---|---|---|
committer | Michael Schubert <schu@schu.io> | 2013-05-27 13:41:09 +0200 |
commit | 563c19a9ce556301e642a508e53598faf3c8935a (patch) | |
tree | c60937f5fb94cab89c83cd007d449b6db91a1ded /include/git2/pack.h | |
parent | 63908cee27e85949130f9b0a187c316f1d98b3a2 (diff) | |
download | libgit2-563c19a9ce556301e642a508e53598faf3c8935a.tar.gz |
packbuilder: also write index in git_packbuilder_write
git_packbuilder_write() used to write a packfile to the passed file
path. Instead, ask for a destination directory and create both the
packfile and an index, as most users probably do expect.
Diffstat (limited to 'include/git2/pack.h')
-rw-r--r-- | include/git2/pack.h | 12 |
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); /** |