mirror of
https://github.com/git/git.git
synced 2025-09-10 22:44:50 +02:00
Merge branch 'ds/path-walk-2'
"git pack-objects" learns to find delta bases from blobs at the same path, using the --path-walk API. * ds/path-walk-2: pack-objects: allow --shallow and --path-walk path-walk: add new 'edge_aggressive' option pack-objects: thread the path-based compression pack-objects: refactor path-walk delta phase scalar: enable path-walk during push via config pack-objects: enable --path-walk via config repack: add --path-walk option t5538: add tests to confirm deltas in shallow pushes pack-objects: introduce GIT_TEST_PACK_PATH_WALK p5313: add performance tests for --path-walk pack-objects: update usage to match docs pack-objects: add --path-walk option pack-objects: extract should_attempt_deltas()
This commit is contained in:
@@ -43,7 +43,7 @@ static char *packdir, *packtmp_name, *packtmp;
|
||||
static const char *const git_repack_usage[] = {
|
||||
N_("git repack [-a] [-A] [-d] [-f] [-F] [-l] [-n] [-q] [-b] [-m]\n"
|
||||
"[--window=<n>] [--depth=<n>] [--threads=<n>] [--keep-pack=<pack-name>]\n"
|
||||
"[--write-midx] [--name-hash-version=<n>]"),
|
||||
"[--write-midx] [--name-hash-version=<n>] [--path-walk]"),
|
||||
NULL
|
||||
};
|
||||
|
||||
@@ -63,6 +63,7 @@ struct pack_objects_args {
|
||||
int quiet;
|
||||
int local;
|
||||
int name_hash_version;
|
||||
int path_walk;
|
||||
struct list_objects_filter_options filter_options;
|
||||
};
|
||||
|
||||
@@ -313,6 +314,8 @@ static void prepare_pack_objects(struct child_process *cmd,
|
||||
strvec_pushf(&cmd->args, "--no-reuse-object");
|
||||
if (args->name_hash_version)
|
||||
strvec_pushf(&cmd->args, "--name-hash-version=%d", args->name_hash_version);
|
||||
if (args->path_walk)
|
||||
strvec_pushf(&cmd->args, "--path-walk");
|
||||
if (args->local)
|
||||
strvec_push(&cmd->args, "--local");
|
||||
if (args->quiet)
|
||||
@@ -1184,6 +1187,8 @@ int cmd_repack(int argc,
|
||||
N_("pass --no-reuse-object to git-pack-objects")),
|
||||
OPT_INTEGER(0, "name-hash-version", &po_args.name_hash_version,
|
||||
N_("specify the name hash version to use for grouping similar objects by path")),
|
||||
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")),
|
||||
|
||||
Reference in New Issue
Block a user