There are a couple of remaining references to `the_repository` in git-multi-pack-index(1). Replace them with the repository that is passed to the builtin and its subcommands. Note that the repository may still be `NULL` until `parse_options()` has been called. The only use of the repository before that point is `repo_config()`, which handles a `NULL` repository. 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 ba5f326dd6ef..c1ad8ebbcc15 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 "config.h" #include "environment.h" @@ -164,7 +163,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); @@ -270,7 +269,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); @@ -305,7 +304,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[] = { @@ -325,7 +324,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); @@ -334,7 +333,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[] = { @@ -354,7 +353,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); @@ -363,7 +362,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[] = { @@ -386,7 +385,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); @@ -412,7 +411,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