@@ -57,6 +57,7 @@ struct pack_objects_args {
int no_reuse_object;
int quiet;
int local;
+ int path_walk;
struct list_objects_filter_options filter_options;
};
@@ -288,6 +289,8 @@ static void prepare_pack_objects(struct child_process *cmd,
strvec_pushf(&cmd->args, "--no-reuse-delta");
if (args->no_reuse_object)
strvec_pushf(&cmd->args, "--no-reuse-object");
+ if (args->path_walk)
+ strvec_pushf(&cmd->args, "--path-walk");
if (args->local)
strvec_push(&cmd->args, "--local");
if (args->quiet)
@@ -1158,6 +1161,8 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
N_("pass --no-reuse-delta to git-pack-objects")),
OPT_BOOL('F', NULL, &po_args.no_reuse_object,
N_("pass --no-reuse-object to git-pack-objects")),
+ OPT_BOOL(0, "path-walk", &po_args.path_walk,
+ N_("pass --path-walk to git-pack-objects")),
OPT_NEGBIT('n', NULL, &run_update_server_info,
N_("do not run git-update-server-info"), 1),
OPT__QUIET(&po_args.quiet, N_("be quiet")),
@@ -52,4 +52,24 @@ test_size 'big recent pack size with --path-walk' '
wc -c <out
'
+test_perf 'full repack' '
+ git repack -adf --no-write-bitmap-index
+'
+
+test_size 'full repack size' '
+ du -a .git/objects/pack | \
+ awk "{ print \$1; }" | \
+ sort -nr | head -n 1
+'
+
+test_perf 'full repack with --path-walk' '
+ git repack -adf --no-write-bitmap-index --path-walk
+'
+
+test_size 'full repack size with --path-walk' '
+ du -a .git/objects/pack | \
+ awk "{ print \$1; }" | \
+ sort -nr | head -n 1
+'
+
test_done