diff options
author | Philip Kelley <phkelley@hotmail.com> | 2013-02-11 08:28:53 -0500 |
---|---|---|
committer | Philip Kelley <phkelley@hotmail.com> | 2013-02-11 09:35:26 -0500 |
commit | b8b897bbc54db5efe34a4adef1f12acb546ce27d (patch) | |
tree | 1952ecc9799282481e0b32e93cb3b37fc7ad61ed /include/git2 | |
parent | 8c29dca6c372cae1c6a97d78252ee1d7ac10673b (diff) | |
download | libgit2-b8b897bbc54db5efe34a4adef1f12acb546ce27d.tar.gz |
Add git_push_options, to set packbuilder parallelism
Diffstat (limited to 'include/git2')
-rw-r--r-- | include/git2/push.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/include/git2/push.h b/include/git2/push.h index 6e07f368e..8caf9a4ed 100644 --- a/include/git2/push.h +++ b/include/git2/push.h @@ -19,6 +19,26 @@ GIT_BEGIN_DECL /** + * Controls the behavior of a git_push object. + */ +typedef struct { + unsigned int version; + + /** + * If the transport being used to push to the remote requires the creation + * of a pack file, this controls the number of worker threads used by + * the packbuilder when creating that pack file to be sent to the remote. + * + * If set to 0, the packbuilder will auto-detect the number of threads + * to create. The default value is 1. + */ + unsigned int pb_parallelism; +} git_push_options; + +#define GIT_PUSH_OPTIONS_VERSION 1 +#define GIT_PUSH_OPTIONS_INIT { GIT_PUSH_OPTIONS_VERSION } + +/** * Create a new push object * * @param out New push object @@ -29,6 +49,18 @@ GIT_BEGIN_DECL GIT_EXTERN(int) git_push_new(git_push **out, git_remote *remote); /** + * Set options on a push object + * + * @param push The push object + * @param opts The options to set on the push object + * + * @return 0 or an error code + */ +GIT_EXTERN(int) git_push_set_options( + git_push *push, + const git_push_options *opts); + +/** * Add a refspec to be pushed * * @param push The push object |