mirror of
https://github.com/git/git
synced 2024-08-25 02:35:46 +00:00
Merge branch 'sb/repack-in-c' into maint
"git repack --max-pack-size=8g" stopped being parsed correctly when the command was reimplemented in C. * sb/repack-in-c: repack: propagate pack-objects options as strings repack: make parsed string options const-correct repack: fix typo in max-pack-size option
This commit is contained in:
commit
90791e3416
|
@ -129,10 +129,10 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
|
||||||
/* variables to be filled by option parsing */
|
/* variables to be filled by option parsing */
|
||||||
int pack_everything = 0;
|
int pack_everything = 0;
|
||||||
int delete_redundant = 0;
|
int delete_redundant = 0;
|
||||||
char *unpack_unreachable = NULL;
|
const char *unpack_unreachable = NULL;
|
||||||
int window = 0, window_memory = 0;
|
const char *window = NULL, *window_memory = NULL;
|
||||||
int depth = 0;
|
const char *depth = NULL;
|
||||||
int max_pack_size = 0;
|
const char *max_pack_size = NULL;
|
||||||
int no_reuse_delta = 0, no_reuse_object = 0;
|
int no_reuse_delta = 0, no_reuse_object = 0;
|
||||||
int no_update_server_info = 0;
|
int no_update_server_info = 0;
|
||||||
int quiet = 0;
|
int quiet = 0;
|
||||||
|
@ -157,13 +157,13 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
|
||||||
N_("pass --local to git-pack-objects")),
|
N_("pass --local to git-pack-objects")),
|
||||||
OPT_STRING(0, "unpack-unreachable", &unpack_unreachable, N_("approxidate"),
|
OPT_STRING(0, "unpack-unreachable", &unpack_unreachable, N_("approxidate"),
|
||||||
N_("with -A, do not loosen objects older than this")),
|
N_("with -A, do not loosen objects older than this")),
|
||||||
OPT_INTEGER(0, "window", &window,
|
OPT_STRING(0, "window", &window, N_("n"),
|
||||||
N_("size of the window used for delta compression")),
|
N_("size of the window used for delta compression")),
|
||||||
OPT_INTEGER(0, "window-memory", &window_memory,
|
OPT_STRING(0, "window-memory", &window_memory, N_("bytes"),
|
||||||
N_("same as the above, but limit memory size instead of entries count")),
|
N_("same as the above, but limit memory size instead of entries count")),
|
||||||
OPT_INTEGER(0, "depth", &depth,
|
OPT_STRING(0, "depth", &depth, N_("n"),
|
||||||
N_("limits the maximum delta depth")),
|
N_("limits the maximum delta depth")),
|
||||||
OPT_INTEGER(0, "max-pack-size", &max_pack_size,
|
OPT_STRING(0, "max-pack-size", &max_pack_size, N_("bytes"),
|
||||||
N_("maximum size of each packfile")),
|
N_("maximum size of each packfile")),
|
||||||
OPT_END()
|
OPT_END()
|
||||||
};
|
};
|
||||||
|
@ -185,13 +185,13 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
|
||||||
argv_array_push(&cmd_args, "--all");
|
argv_array_push(&cmd_args, "--all");
|
||||||
argv_array_push(&cmd_args, "--reflog");
|
argv_array_push(&cmd_args, "--reflog");
|
||||||
if (window)
|
if (window)
|
||||||
argv_array_pushf(&cmd_args, "--window=%u", window);
|
argv_array_pushf(&cmd_args, "--window=%s", window);
|
||||||
if (window_memory)
|
if (window_memory)
|
||||||
argv_array_pushf(&cmd_args, "--window-memory=%u", window_memory);
|
argv_array_pushf(&cmd_args, "--window-memory=%s", window_memory);
|
||||||
if (depth)
|
if (depth)
|
||||||
argv_array_pushf(&cmd_args, "--depth=%u", depth);
|
argv_array_pushf(&cmd_args, "--depth=%s", depth);
|
||||||
if (max_pack_size)
|
if (max_pack_size)
|
||||||
argv_array_pushf(&cmd_args, "--max_pack_size=%u", max_pack_size);
|
argv_array_pushf(&cmd_args, "--max-pack-size=%s", max_pack_size);
|
||||||
if (no_reuse_delta)
|
if (no_reuse_delta)
|
||||||
argv_array_pushf(&cmd_args, "--no-reuse-delta");
|
argv_array_pushf(&cmd_args, "--no-reuse-delta");
|
||||||
if (no_reuse_object)
|
if (no_reuse_object)
|
||||||
|
|
Loading…
Reference in a new issue