summaryrefslogtreecommitdiff
path: root/tests-clar/online
diff options
context:
space:
mode:
authorPhilip Kelley <phkelley@hotmail.com>2013-02-11 08:28:53 -0500
committerPhilip Kelley <phkelley@hotmail.com>2013-02-11 09:35:26 -0500
commitb8b897bbc54db5efe34a4adef1f12acb546ce27d (patch)
tree1952ecc9799282481e0b32e93cb3b37fc7ad61ed /tests-clar/online
parent8c29dca6c372cae1c6a97d78252ee1d7ac10673b (diff)
downloadlibgit2-b8b897bbc54db5efe34a4adef1f12acb546ce27d.tar.gz
Add git_push_options, to set packbuilder parallelism
Diffstat (limited to 'tests-clar/online')
-rw-r--r--tests-clar/online/push.c5
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]));