summaryrefslogtreecommitdiff
path: root/builtin-pack-objects.c
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2007-09-10 15:51:34 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-09-10 17:50:21 (GMT)
commit693b86fffb4271dece49f439b133595924a75cbb (patch)
tree7ad528796225b92a641f3525d18c4a1767d0c438 /builtin-pack-objects.c
parentb81d9af71e1c6460511322c276b4b7ad7c86c444 (diff)
downloadgit-693b86fffb4271dece49f439b133595924a75cbb.zip
git-693b86fffb4271dece49f439b133595924a75cbb.tar.gz
git-693b86fffb4271dece49f439b133595924a75cbb.tar.bz2
threaded delta search: add pack.threads config variable
Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-pack-objects.c')
-rw-r--r--builtin-pack-objects.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
index af12e45..e091bcb 100644
--- a/builtin-pack-objects.c
+++ b/builtin-pack-objects.c
@@ -1746,6 +1746,17 @@ static int git_pack_config(const char *k, const char *v)
cache_max_small_delta_size = git_config_int(k, v);
return 0;
}
+ if (!strcmp(k, "pack.threads")) {
+ delta_search_threads = git_config_int(k, v);
+ if (delta_search_threads < 1)
+ die("invalid number of threads specified (%d)",
+ delta_search_threads);
+#ifndef THREADED_DELTA_SEARCH
+ if (delta_search_threads > 1)
+ warning("no threads support, ignoring %s", k);
+#endif
+ return 0;
+ }
return git_default_config(k, v);
}