diff options
author | Ben Straub <bs@github.com> | 2012-11-18 21:38:08 -0700 |
---|---|---|
committer | Ben Straub <bs@github.com> | 2012-11-27 13:17:45 -0800 |
commit | 2508cc66eb91597b12dc19721d9cea1f06e72107 (patch) | |
tree | 89e0ec2a924d9dc6b66461f462afbb999045ad27 /include/git2/pack.h | |
parent | 469827812f95e979e3c6468567b2c9ed138a9849 (diff) | |
download | libgit2-2508cc66eb91597b12dc19721d9cea1f06e72107.tar.gz |
Rename ref and reflog apis for consistency
Diffstat (limited to 'include/git2/pack.h')
-rw-r--r-- | include/git2/pack.h | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/include/git2/pack.h b/include/git2/pack.h index 94d5fc6a1..585cffef6 100644 --- a/include/git2/pack.h +++ b/include/git2/pack.h @@ -38,8 +38,9 @@ GIT_EXTERN(int) git_packbuilder_new(git_packbuilder **out, git_repository *repo) * * @param pb The packbuilder * @param n Number of threads to spawn + * @return number of actual threads to be used */ -GIT_EXTERN(void) git_packbuilder_set_threads(git_packbuilder *pb, unsigned int n); +GIT_EXTERN(unsigned int) git_packbuilder_set_threads(git_packbuilder *pb, unsigned int n); /** * Insert a single object @@ -48,12 +49,12 @@ GIT_EXTERN(void) git_packbuilder_set_threads(git_packbuilder *pb, unsigned int n * commits followed by trees and blobs. * * @param pb The packbuilder - * @param oid The oid of the commit - * @param oid The name; might be NULL + * @param id The oid of the commit + * @param name The name; might be NULL * * @return 0 or an error code */ -GIT_EXTERN(int) git_packbuilder_insert(git_packbuilder *pb, const git_oid *oid, const char *name); +GIT_EXTERN(int) git_packbuilder_insert(git_packbuilder *pb, const git_oid *id, const char *name); /** * Insert a root tree object @@ -61,11 +62,11 @@ GIT_EXTERN(int) git_packbuilder_insert(git_packbuilder *pb, const git_oid *oid, * This will add the tree as well as all referenced trees and blobs. * * @param pb The packbuilder - * @param oid The oid of the root tree + * @param id The oid of the root tree * * @return 0 or an error code */ -GIT_EXTERN(int) git_packbuilder_insert_tree(git_packbuilder *pb, const git_oid *oid); +GIT_EXTERN(int) git_packbuilder_insert_tree(git_packbuilder *pb, const git_oid *id); /** * Write the new pack and the corresponding index to path @@ -82,15 +83,17 @@ GIT_EXTERN(int) git_packbuilder_write(git_packbuilder *pb, const char *file); * * @param pb the packbuilder * @param cb the callback to call with each packed object's buffer - * @param data the callback's data + * @param payload the callback's data * @return 0 or an error code */ -GIT_EXTERN(int) git_packbuilder_foreach(git_packbuilder *pb, int (*cb)(void *buf, size_t size, void *data), void *data); +typedef int (*git_packbuilder_foreach_cb)(void *buf, size_t size, void *payload); +GIT_EXTERN(int) git_packbuilder_foreach(git_packbuilder *pb, git_packbuilder_foreach_cb cb, void *payload); /** * Get the total number of objects the packbuilder will write out * * @param pb the packbuilder + * @return */ GIT_EXTERN(uint32_t) git_packbuilder_object_count(git_packbuilder *pb); @@ -98,6 +101,7 @@ 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 + * @return */ GIT_EXTERN(uint32_t) git_packbuilder_written(git_packbuilder *pb); |