From 693b86fffb4271dece49f439b133595924a75cbb Mon Sep 17 00:00:00 2001 From: Nicolas Pitre Date: Mon, 10 Sep 2007 11:51:34 -0400 Subject: threaded delta search: add pack.threads config variable Signed-off-by: Nicolas Pitre Signed-off-by: Junio C Hamano --- builtin-pack-objects.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'builtin-pack-objects.c') diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c index af12e454e..e091bcbda 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); } -- cgit v1.2.1