There are a couple of remaining references to `the_repository` in
git-multi-pack-index(1). The command cannot run outside of a repository,
so these references can be trivially replaced with the repository
passed to the subcommands.
Signed-off-by: Justin Tobler <jlto…@gmail.com>
---
builtin/multi-pack-index.c | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/builtin/multi-pack-index.c b/builtin/multi-pack-index.c
index 1a27d523c7ab..8528f4f513ef 100644
--- a/builtin/multi-pack-index.c
+++ b/builtin/multi-pack-index.c
@@ -1,4 +1,3 @@
-#define USE_THE_REPOSITORY_VARIABLE
#include "builtin.h"
#include "abspath.h"
#include "config.h"
@@ -180,7 +179,7 @@ static int cmd_multi_pack_index_write(int argc, const char **argv,
opts.flags |= MIDX_WRITE_BITMAP_HASH_CACHE;
- repo_config(the_repository, git_multi_pack_index_write_config, NULL);
+ repo_config(repo, git_multi_pack_index_write_config, NULL);
options = add_common_options(builtin_multi_pack_index_write_options);
@@ -286,7 +285,7 @@ static int cmd_multi_pack_index_compact(int argc, const char **argv,
options);
}
- packed_source = handle_object_dir_option(the_repository);
+ packed_source = handle_object_dir_option(repo);
FREE_AND_NULL(options);
@@ -321,7 +320,7 @@ static int cmd_multi_pack_index_compact(int argc, const char **argv,
static int cmd_multi_pack_index_verify(int argc, const char **argv,
const char *prefix,
- struct repository *repo UNUSED)
+ struct repository *repo)
{
struct option *options;
static struct option builtin_multi_pack_index_verify_options[] = {
@@ -341,7 +340,7 @@ static int cmd_multi_pack_index_verify(int argc, const char **argv,
if (argc)
usage_with_options(builtin_multi_pack_index_verify_usage,
options);
- packed_source = handle_object_dir_option(the_repository);
+ packed_source = handle_object_dir_option(repo);
FREE_AND_NULL(options);
@@ -350,7 +349,7 @@ static int cmd_multi_pack_index_verify(int argc, const char **argv,
static int cmd_multi_pack_index_expire(int argc, const char **argv,
const char *prefix,
- struct repository *repo UNUSED)
+ struct repository *repo)
{
struct option *options;
static struct option builtin_multi_pack_index_expire_options[] = {
@@ -370,7 +369,7 @@ static int cmd_multi_pack_index_expire(int argc, const char **argv,
if (argc)
usage_with_options(builtin_multi_pack_index_expire_usage,
options);
- packed_source = handle_object_dir_option(the_repository);
+ packed_source = handle_object_dir_option(repo);
FREE_AND_NULL(options);
@@ -379,7 +378,7 @@ static int cmd_multi_pack_index_expire(int argc, const char **argv,
static int cmd_multi_pack_index_repack(int argc, const char **argv,
const char *prefix,
- struct repository *repo UNUSED)
+ struct repository *repo)
{
struct option *options;
static struct option builtin_multi_pack_index_repack_options[] = {
@@ -402,7 +401,7 @@ static int cmd_multi_pack_index_repack(int argc, const char **argv,
if (argc)
usage_with_options(builtin_multi_pack_index_repack_usage,
options);
- packed_source = handle_object_dir_option(the_repository);
+ packed_source = handle_object_dir_option(repo);
FREE_AND_NULL(options);
@@ -428,7 +427,7 @@ int cmd_multi_pack_index(int argc,
disable_replace_refs();
- repo_config(the_repository, git_default_config, NULL);
+ repo_config(repo, git_default_config, NULL);
argc = parse_options(argc, argv, prefix, options,
builtin_multi_pack_index_usage, 0);
--
2.56.0