summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-05-29 03:34:41 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-05-29 03:34:41 (GMT)
commit31fb6f4d8da01288094536001907eb32413f1f60 (patch)
tree842585bf9f3536868c0c13212b833c91559663ba /builtin
parent5f074ca7e8ddccb6471e457d7a3f85c1fe00e21a (diff)
parent40bcf3188a6f02acba94587593124ccca5a37e2b (diff)
downloadgit-31fb6f4d8da01288094536001907eb32413f1f60.zip
git-31fb6f4d8da01288094536001907eb32413f1f60.tar.gz
git-31fb6f4d8da01288094536001907eb32413f1f60.tar.bz2
Merge branch 'jc/repack-threads'
"git repack" learned to accept the --threads=<n> option and pass it to pack-objects. * jc/repack-threads: repack: accept --threads=<n> and pass it down to pack-objects
Diffstat (limited to 'builtin')
-rw-r--r--builtin/repack.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/builtin/repack.c b/builtin/repack.c
index 677bc7c..38ba4ef 100644
--- a/builtin/repack.c
+++ b/builtin/repack.c
@@ -155,6 +155,7 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
int keep_unreachable = 0;
const char *window = NULL, *window_memory = NULL;
const char *depth = NULL;
+ const char *threads = NULL;
const char *max_pack_size = NULL;
int no_reuse_delta = 0, no_reuse_object = 0;
int no_update_server_info = 0;
@@ -190,6 +191,8 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
N_("same as the above, but limit memory size instead of entries count")),
OPT_STRING(0, "depth", &depth, N_("n"),
N_("limits the maximum delta depth")),
+ OPT_STRING(0, "threads", &threads, N_("n"),
+ N_("limits the maximum number of threads")),
OPT_STRING(0, "max-pack-size", &max_pack_size, N_("bytes"),
N_("maximum size of each packfile")),
OPT_BOOL(0, "pack-kept-objects", &pack_kept_objects,
@@ -234,6 +237,8 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
argv_array_pushf(&cmd.args, "--window-memory=%s", window_memory);
if (depth)
argv_array_pushf(&cmd.args, "--depth=%s", depth);
+ if (threads)
+ argv_array_pushf(&cmd.args, "--threads=%s", threads);
if (max_pack_size)
argv_array_pushf(&cmd.args, "--max-pack-size=%s", max_pack_size);
if (no_reuse_delta)