Skip to content

Commit

Permalink
autodetect number of CPUs by default when using threads
Browse files Browse the repository at this point in the history
... 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>
  • Loading branch information
Nicolas Pitre authored and Junio C Hamano committed Dec 13, 2008
1 parent de0db42 commit 43cc2b4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion builtin-pack-objects.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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++) {
Expand Down

0 comments on commit 43cc2b4

Please sign in to comment.