summaryrefslogtreecommitdiff
path: root/src/pack-objects.c
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 /src/pack-objects.c
parent8c29dca6c372cae1c6a97d78252ee1d7ac10673b (diff)
downloadlibgit2-b8b897bbc54db5efe34a4adef1f12acb546ce27d.tar.gz
Add git_push_options, to set packbuilder parallelism
Diffstat (limited to 'src/pack-objects.c')
-rw-r--r--src/pack-objects.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/pack-objects.c b/src/pack-objects.c
index a76f8a111..e4b67192d 100644
--- a/src/pack-objects.c
+++ b/src/pack-objects.c
@@ -144,7 +144,14 @@ on_error:
unsigned int git_packbuilder_set_threads(git_packbuilder *pb, unsigned int n)
{
assert(pb);
+
+#ifdef GIT_THREADS
pb->nr_threads = n;
+#else
+ GIT_UNUSED(n);
+ assert(1 == pb->nr_threads);
+#endif
+
return pb->nr_threads;
}