diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2015-03-12 18:04:25 -0400 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2015-03-12 18:04:25 -0400 |
commit | 12e1fff79d29e8eee1871316eaa58f2bfa3e67ff (patch) | |
tree | fee243c933d41542e0c5fcd36133c6206591c44b | |
parent | 15f581747c57f1bb5f3c3a173139789ec759c964 (diff) | |
parent | 0ef54a63580171b341d85dee65c063bee31ba35f (diff) | |
download | libgit2-12e1fff79d29e8eee1871316eaa58f2bfa3e67ff.tar.gz |
Merge pull request #2973 from libgit2/cmn/local-pack-threading
local: create pack with multiple threads
-rw-r--r-- | CHANGELOG.md | 3 | ||||
-rw-r--r-- | src/transports/local.c | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 71112bfaa..5236a6d6f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,9 @@ v0.22 + 1 removed. Use `git_repository_set_ident()` and `git_repository_ident()` to override the signature to be used. +* The local transport now auto-scales the number of threads to use + when creating the packfile instead of sticking to one. + ### API additions * Parsing and retrieving a configuration value as a path is exposed diff --git a/src/transports/local.c b/src/transports/local.c index bedd2390b..588b7ce17 100644 --- a/src/transports/local.c +++ b/src/transports/local.c @@ -609,6 +609,9 @@ static int local_download_pack( data.progress_payload = progress_payload; data.writepack = writepack; + /* autodetect */ + git_packbuilder_set_threads(pack, 0); + if ((error = git_packbuilder_foreach(pack, foreach_cb, &data)) != 0) goto cleanup; } |