From 30285a3cb9dd29275394686b41b4bdd7b198c91f Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Sat, 23 May 2020 15:04:19 -0700 Subject: mempack: Use threads when building the pack The mempack ODB backend creates a packbuilder internally to write out a pack; call git_packbuilder_set_threads on that packbuilder, to use threads for packing if available. --- src/odb_mempack.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/odb_mempack.c b/src/odb_mempack.c index 69c423bec..6d20b39ba 100644 --- a/src/odb_mempack.c +++ b/src/odb_mempack.c @@ -110,6 +110,8 @@ int git_mempack_dump(git_buf *pack, git_repository *repo, git_odb_backend *_back if (git_packbuilder_new(&packbuilder, repo) < 0) return -1; + git_packbuilder_set_threads(packbuilder, 0); + for (i = 0; i < db->commits.size; ++i) { struct memobject *commit = db->commits.ptr[i]; -- cgit v1.2.1