diff options
author | Philip Kelley <phkelley@hotmail.com> | 2013-02-11 17:28:53 +0400 |
---|---|---|
committer | Philip Kelley <phkelley@hotmail.com> | 2013-02-11 18:35:26 +0400 |
commit | b8b897bbc54db5efe34a4adef1f12acb546ce27d (patch) | |
tree | 1952ecc9799282481e0b32e93cb3b37fc7ad61ed /tests-clar/online/push.c | |
parent | 8c29dca6c372cae1c6a97d78252ee1d7ac10673b (diff) |
Add git_push_options, to set packbuilder parallelism
Diffstat (limited to 'tests-clar/online/push.c')
-rw-r--r-- | tests-clar/online/push.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests-clar/online/push.c b/tests-clar/online/push.c index 56183473a..907d6d29f 100644 --- a/tests-clar/online/push.c +++ b/tests-clar/online/push.c @@ -349,13 +349,18 @@ static void do_push(const char *refspecs[], size_t refspecs_len, expected_ref expected_refs[], size_t expected_refs_len, int expected_ret) { git_push *push; + git_push_options opts = GIT_PUSH_OPTIONS_INIT; size_t i; int ret; if (_remote) { + /* Auto-detect the number of threads to use */ + opts.pb_parallelism = 0; + cl_git_pass(git_remote_connect(_remote, GIT_DIRECTION_PUSH)); cl_git_pass(git_push_new(&push, _remote)); + cl_git_pass(git_push_set_options(push, &opts)); for (i = 0; i < refspecs_len; i++) cl_git_pass(git_push_add_refspec(push, refspecs[i])); |