diff --git a/builtin/gc.c b/builtin/gc.c index d9e3b9d2ec..e5c3d082ed 100644 --- a/builtin/gc.c +++ b/builtin/gc.c @@ -1916,7 +1916,7 @@ static int maintenance_register(int argc, const char **argv, const char *prefix, git_config_set("maintenance.auto", "false"); /* Set maintenance strategy, if unset */ - if (git_config_get("maintenance.strategy")) + if (repo_config_get(the_repository, "maintenance.strategy")) git_config_set("maintenance.strategy", "incremental"); if (!git_config_get_string_multi(key, &list)) { diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c index 89ee09abea..6bcc741a6a 100644 --- a/builtin/submodule--helper.c +++ b/builtin/submodule--helper.c @@ -549,7 +549,7 @@ static int module_init(int argc, const char **argv, const char *prefix, * If there are no path args and submodule.active is set then, * by default, only initialize 'active' modules. */ - if (!argc && !git_config_get("submodule.active")) + if (!argc && !repo_config_get(the_repository, "submodule.active")) module_list_active(&list); info.prefix = prefix; @@ -2878,7 +2878,7 @@ static int module_update(int argc, const char **argv, const char *prefix, * If there are no path args and submodule.active is set then, * by default, only initialize 'active' modules. */ - if (!argc && !git_config_get("submodule.active")) + if (!argc && !repo_config_get(the_repository, "submodule.active")) module_list_active(&list); info.prefix = opt.prefix; @@ -3349,7 +3349,7 @@ static void configure_added_submodule(struct add_data *add_data) * is_submodule_active(), since that function needs to find * out the value of "submodule.active" again anyway. */ - if (!git_config_get("submodule.active")) { + if (!repo_config_get(the_repository, "submodule.active")) { /* * If the submodule being added isn't already covered by the * current configured pathspec, set the submodule's active flag diff --git a/config.h b/config.h index 4eea99e9b9..9261ed0f8d 100644 --- a/config.h +++ b/config.h @@ -719,11 +719,6 @@ NORETURN void git_die_config_linenr(const char *key, const char *filename, int l int lookup_config(const char **mapping, int nr_mapping, const char *var); # ifdef USE_THE_REPOSITORY_VARIABLE -static inline int git_config_get(const char *key) -{ - return repo_config_get(the_repository, key); -} - static inline int git_config_get_value(const char *key, const char **value) { return repo_config_get_value(the_repository, key, value); diff --git a/t/helper/test-config.c b/t/helper/test-config.c index 41ba864790..cacf6f306b 100644 --- a/t/helper/test-config.c +++ b/t/helper/test-config.c @@ -137,7 +137,7 @@ int cmd__config(int argc, const char **argv) } else if (argc == 3 && !strcmp(argv[1], "get")) { int ret; - if (!(ret = git_config_get(argv[2]))) + if (!(ret = repo_config_get(the_repository, argv[2]))) goto exit0; else if (ret == 1) printf("Value not found for \"%s\"\n", argv[2]);