aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/multi-pack-index.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/multi-pack-index.c')
-rw-r--r--builtin/multi-pack-index.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/builtin/multi-pack-index.c b/builtin/multi-pack-index.c
index 8805cbbeb3..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;
@@ -267,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;