libgit2/libgit2 — pull request #1333 by phkelley (2013-02-11 14:36:49+00:00)
Title: Add git_push_options, to set packbuilder parallelism

The packbuilder code that @schu ported from git.git allows for the use of multiple worker threads during deltafication. This knob is already exposed in the API `git_packbuilder_set_threads`. 1 thread (no additional workers) is the default. A value of 0 is special, and uses `git_online_cpus` to set the degree of parallelism to the number of cores in the system.

This PR creates a `git_push_options` structure and `git_push_set_options` function so that the degree of parallelism of a `git_push`'s packbuilder can be set.

Because the threading logic comes from git.git, it is already well-tested, and I have enabled auto-detection in our own push tests. Testing was done on Windows (x86 and x64) and Linux (amd64), with and without GIT_THREADS defined.