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>
This commit is contained in:
parent
b81d9af71e
commit
693b86fffb
@ -630,9 +630,17 @@ pack.deltaCacheSize::
|
|||||||
A value of 0 means no limit. Defaults to 0.
|
A value of 0 means no limit. Defaults to 0.
|
||||||
|
|
||||||
pack.deltaCacheLimit::
|
pack.deltaCacheLimit::
|
||||||
The maxium size of a delta, that is cached in
|
The maximum size of a delta, that is cached in
|
||||||
gitlink:git-pack-objects[1]. Defaults to 1000.
|
gitlink:git-pack-objects[1]. Defaults to 1000.
|
||||||
|
|
||||||
|
pack.threads::
|
||||||
|
Specifies the number of threads to spawn when searching for best
|
||||||
|
delta matches. This requires that gitlink:git-pack-objects[1]
|
||||||
|
be compiled with pthreads otherwise this option is ignored with a
|
||||||
|
warning. This is meant to reduce packing time on multiprocessor
|
||||||
|
machines. The required amount of memory for the delta search window
|
||||||
|
is however multiplied by the number of threads.
|
||||||
|
|
||||||
pull.octopus::
|
pull.octopus::
|
||||||
The default merge strategy to use when pulling multiple branches
|
The default merge strategy to use when pulling multiple branches
|
||||||
at once.
|
at once.
|
||||||
|
@ -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);
|
cache_max_small_delta_size = git_config_int(k, v);
|
||||||
return 0;
|
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);
|
return git_default_config(k, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user