diff options
Diffstat (limited to 'builtin/multi-pack-index.c')
| -rw-r--r-- | builtin/multi-pack-index.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/builtin/multi-pack-index.c b/builtin/multi-pack-index.c index 9cf1a32d65..d159ed1314 100644 --- a/builtin/multi-pack-index.c +++ b/builtin/multi-pack-index.c @@ -1,7 +1,7 @@ +#define USE_THE_REPOSITORY_VARIABLE #include "builtin.h" #include "abspath.h" #include "config.h" -#include "environment.h" #include "gettext.h" #include "parse-options.h" #include "midx.h" @@ -9,6 +9,7 @@ #include "trace2.h" #include "object-store-ll.h" #include "replace-object.h" +#include "repository.h" #define BUILTIN_MIDX_WRITE_USAGE \ N_("git multi-pack-index [<options>] write [--preferred-pack=<pack>]" \ @@ -63,7 +64,7 @@ static int parse_object_dir(const struct option *opt, const char *arg, char **value = opt->value; free(*value); if (unset) - *value = xstrdup(get_object_directory()); + *value = xstrdup(repo_get_object_directory(the_repository)); else *value = real_pathdup(arg, 1); return 0; @@ -129,6 +130,8 @@ static int cmd_multi_pack_index_write(int argc, const char **argv, MIDX_WRITE_BITMAP | MIDX_WRITE_REV_INDEX), OPT_BIT(0, "progress", &opts.flags, N_("force progress reporting"), MIDX_PROGRESS), + OPT_BIT(0, "incremental", &opts.flags, + N_("write a new incremental MIDX"), MIDX_WRITE_INCREMENTAL), OPT_BOOL(0, "stdin-packs", &opts.stdin_packs, N_("write multi-pack index containing only given indexes")), OPT_FILENAME(0, "refs-snapshot", &opts.refs_snapshot, @@ -265,8 +268,10 @@ static int cmd_multi_pack_index_repack(int argc, const char **argv, (size_t)opts.batch_size, opts.flags); } -int cmd_multi_pack_index(int argc, const char **argv, - const char *prefix) +int cmd_multi_pack_index(int argc, + const char **argv, + const char *prefix, + struct repository *repo UNUSED) { int res; parse_opt_subcommand_fn *fn = NULL; |
