This very simple patch adds a --threads argument for git-repack. It simply forwards the argument to git-pack-objects. --- Documentation/git-repack.txt | 11 +++++++++++ git-repack.sh | 3 ++- 2 files changed, 13 insertions(+), 1 deletions(-) diff --git a/Documentation/git-repack.txt b/Documentation/git-repack.txt index 4c1aff6..be52789 100644 --- a/Documentation/git-repack.txt +++ b/Documentation/git-repack.txt @@ -10,6 +10,7 @@ SYNOPSIS -------- [verse] 'git repack' [-a] [-A] [-d] [-f] [-F] [-l] [-n] [-q] [--window=<n>] [--depth=<n>] + [--threads=<n>] DESCRIPTION ----------- @@ -92,6 +93,16 @@ other objects in that pack they already have locally. to be applied that many times to get to the necessary object. The default value for --window is 10 and --depth is 50. +--threads=<n>:: + Specifies the number of threads to spawn when searching for best + delta matches. This requires that pack-objects 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. Specifying 0 will cause git to auto-detect + `--threads=0` makes git auto-detect the number of threads to use, + which is the default. + --window-memory=<n>:: This option provides an additional limit on top of `--window`; the window size will dynamically scale down so as to not take diff --git a/git-repack.sh b/git-repack.sh index 624feec..c8cf5cc 100755 --- a/git-repack.sh +++ b/git-repack.sh @@ -20,6 +20,7 @@ window= size of the window used for delta compression window-memory= same as the above, but limit memory size instead of entries count depth= limits the maximum delta depth max-pack-size= maximum size of each packfile +threads= maximum number of threads " SUBDIRECTORY_OK='Yes' . git-sh-setup @@ -38,7 +39,7 @@ do -f) no_reuse=--no-reuse-delta ;; -F) no_reuse=--no-reuse-object ;; -l) local=--local ;; - --max-pack-size|--window|--window-memory|--depth) + --max-pack-size|--window|--window-memory|--depth|--threads) extra="$extra $1=$2"; shift ;; --) shift; break;; *) usage ;; -- 1.7.7.3 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html