summaryrefslogtreecommitdiff
path: root/tests-clar
diff options
context:
space:
mode:
authorBen Straub <bs@github.com>2013-02-12 10:50:55 -0800
committerBen Straub <bs@github.com>2013-02-12 10:50:55 -0800
commit6a0ffe84a721504783bdb3579d239849960dacd6 (patch)
treed18695e355f03cf79044a0bf48b9b4c35d876064 /tests-clar
parentfbe67de9976476aa57ded26c3ffef422f71a21b4 (diff)
parentb8b897bbc54db5efe34a4adef1f12acb546ce27d (diff)
downloadlibgit2-6a0ffe84a721504783bdb3579d239849960dacd6.tar.gz
Merge pull request #1333 from phkelley/push_options
Add git_push_options, to set packbuilder parallelism
Diffstat (limited to 'tests-clar')
-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]));