The packbuilder
Path to the directory where the packfile and index should be stored, or NULL for default location
permissions to use creating a packfile or 0 for defaults
function to call with progress information from the indexer (optional)
payload for the progress callback (optional)
0 or an error code
Write the new pack and corresponding index file to path.