Skip to content

Commit 3dcbb2e

Browse files
committed
fixup! repack: add --path-walk option
Signed-off-by: Derrick Stolee <[email protected]>
1 parent 0257d18 commit 3dcbb2e

File tree

3 files changed

+2
-43
lines changed

3 files changed

+2
-43
lines changed

Documentation/git-repack.adoc

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ SYNOPSIS
1111
[verse]
1212
'git repack' [-a] [-A] [-d] [-f] [-F] [-l] [-n] [-q] [-b] [-m]
1313
[--window=<n>] [--depth=<n>] [--threads=<n>] [--keep-pack=<pack-name>]
14-
[--write-midx] [--name-hash-version=<n>] [--path-walk]
14+
[--write-midx] [--name-hash-version=<n>]
1515

1616
DESCRIPTION
1717
-----------
@@ -258,18 +258,6 @@ linkgit:git-multi-pack-index[1]).
258258
Provide this argument to the underlying `git pack-objects` process.
259259
See linkgit:git-pack-objects[1] for full details.
260260

261-
--path-walk::
262-
This option passes the `--path-walk` option to the underlying
263-
`git pack-options` process (see linkgit:git-pack-objects[1]).
264-
By default, `git pack-objects` walks objects in an order that
265-
presents trees and blobs in an order unrelated to the path they
266-
appear relative to a commit's root tree. The `--path-walk` option
267-
enables a different walking algorithm that organizes trees and
268-
blobs by path. This has the potential to improve delta compression
269-
especially in the presence of filenames that cause collisions in
270-
Git's default name-hash algorithm. Due to changing how the objects
271-
are walked, this option is not compatible with `--delta-islands`
272-
or `--filter`.
273261

274262
CONFIGURATION
275263
-------------

builtin/repack.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ static char *packdir, *packtmp_name, *packtmp;
4343
static const char *const git_repack_usage[] = {
4444
N_("git repack [-a] [-A] [-d] [-f] [-F] [-l] [-n] [-q] [-b] [-m]\n"
4545
"[--window=<n>] [--depth=<n>] [--threads=<n>] [--keep-pack=<pack-name>]\n"
46-
"[--write-midx] [--name-hash-version=<n>] [--path-walk]"),
46+
"[--write-midx] [--name-hash-version=<n>]"),
4747
NULL
4848
};
4949

@@ -63,7 +63,6 @@ struct pack_objects_args {
6363
int quiet;
6464
int local;
6565
int name_hash_version;
66-
int path_walk;
6766
struct list_objects_filter_options filter_options;
6867
};
6968

@@ -314,8 +313,6 @@ static void prepare_pack_objects(struct child_process *cmd,
314313
strvec_pushf(&cmd->args, "--no-reuse-object");
315314
if (args->name_hash_version)
316315
strvec_pushf(&cmd->args, "--name-hash-version=%d", args->name_hash_version);
317-
if (args->path_walk)
318-
strvec_pushf(&cmd->args, "--path-walk");
319316
if (args->local)
320317
strvec_push(&cmd->args, "--local");
321318
if (args->quiet)
@@ -1187,8 +1184,6 @@ int cmd_repack(int argc,
11871184
N_("pass --no-reuse-object to git-pack-objects")),
11881185
OPT_INTEGER(0, "name-hash-version", &po_args.name_hash_version,
11891186
N_("specify the name hash version to use for grouping similar objects by path")),
1190-
OPT_BOOL(0, "path-walk", &po_args.path_walk,
1191-
N_("(EXPERIMENTAL!) pass --path-walk to git-pack-objects")),
11921187
OPT_NEGBIT('n', NULL, &run_update_server_info,
11931188
N_("do not run git-update-server-info"), 1),
11941189
OPT__QUIET(&po_args.quiet, N_("be quiet")),

t/perf/p5313-pack-objects.sh

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -64,28 +64,4 @@ do
6464
'
6565
done
6666

67-
test_perf 'thin pack with --path-walk' '
68-
git pack-objects --thin --stdout --revs --sparse --path-walk <in-thin >out
69-
'
70-
71-
test_size 'thin pack size with --path-walk' '
72-
wc -c <out
73-
'
74-
75-
test_perf 'big pack with --path-walk' '
76-
git pack-objects --stdout --revs --sparse --path-walk <in-big >out
77-
'
78-
79-
test_size 'big pack size with --path-walk' '
80-
wc -c <out
81-
'
82-
83-
test_perf 'repack with --path-walk' '
84-
git repack -adf --path-walk
85-
'
86-
87-
test_size 'repack size with --path-walk' '
88-
wc -c <.git/objects/pack/pack-*.pack
89-
'
90-
9167
test_done

0 commit comments

Comments
 (0)