summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1b52ac5)
raw | patch | inline | side by side (parent: 1b52ac5)
author | Nicolas Pitre <nico@fluxnic.net> | |
Wed, 4 Nov 2009 21:32:46 +0000 (16:32 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 6 Nov 2009 07:11:42 +0000 (23:11 -0800) |
Let's keep thread stuff close together if possible. And in this case,
this even reduces the #ifdef noise, and allows for skipping the
autodetection altogether if delta search is not needed (like with a pure
clone).
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
this even reduces the #ifdef noise, and allows for skipping the
autodetection altogether if delta search is not needed (like with a pure
clone).
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-pack-objects.c | patch | blob | history |
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
index 02f9246cdb29903e9d7aafe47604f6882a3e7f86..4c91e944c21df3d5e02535115cdd6098ee49d86d 100644 (file)
--- a/builtin-pack-objects.c
+++ b/builtin-pack-objects.c
struct thread_params *p;
int i, ret, active_threads = 0;
+ if (!delta_search_threads) /* --threads=0 means autodetect */
+ delta_search_threads = online_cpus();
if (delta_search_threads <= 1) {
find_deltas(list, &list_size, window, depth, processed);
return;
if (keep_unreachable && unpack_unreachable)
die("--keep-unreachable and --unpack-unreachable are incompatible.");
-#ifdef THREADED_DELTA_SEARCH
- if (!delta_search_threads) /* --threads=0 means autodetect */
- delta_search_threads = online_cpus();
-#endif
-
prepare_packed_git();
if (progress)