summaryrefslogtreecommitdiff
path: root/builtin-pack-objects.c
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2008-12-11 20:36:47 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-12-13 03:47:36 (GMT)
commit43cc2b4266cc75f1a5a10e1a805d05e419000573 (patch)
treef2efb709d61fc55e243f37718bfa2649c2e4892a /builtin-pack-objects.c
parentde0db422782ddaf7754ac5b03fdc6dc5de1a9ae4 (diff)
downloadgit-43cc2b4266cc75f1a5a10e1a805d05e419000573.zip
git-43cc2b4266cc75f1a5a10e1a805d05e419000573.tar.gz
git-43cc2b4266cc75f1a5a10e1a805d05e419000573.tar.bz2
autodetect number of CPUs by default when using threads
... and display the actual number of threads used when locally repacking. A remote server still won't tell you how many threads it uses during a fetch though. 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.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
index cedef52..619e597 100644
--- a/builtin-pack-objects.c
+++ b/builtin-pack-objects.c
@@ -78,7 +78,7 @@ static int progress = 1;
static int window = 10;
static uint32_t pack_size_limit, pack_size_limit_cfg;
static int depth = 50;
-static int delta_search_threads = 1;
+static int delta_search_threads;
static int pack_to_stdout;
static int num_preferred_base;
static struct progress *progress_state;
@@ -1612,6 +1612,9 @@ static void ll_find_deltas(struct object_entry **list, unsigned list_size,
find_deltas(list, &list_size, window, depth, processed);
return;
}
+ if (progress > pack_to_stdout)
+ fprintf(stderr, "Delta compression using %d threads.\n",
+ delta_search_threads);
/* Partition the work amongst work threads. */
for (i = 0; i < delta_search_threads; i++) {