diff options
| author | Patrick Steinhardt <ps@pks.im> | 2025-07-23 16:08:24 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-07-23 08:15:18 -0700 |
| commit | 7807051e9b58628b09e77cca396306c9022b90c0 (patch) | |
| tree | 2c56c176a687400c90a7758d8f29ba24e8e7aa8c /builtin/submodule--helper.c | |
| parent | 83bd9e03eddffbec034b8c79f46bfd360f0ea267 (diff) | |
| download | git-7807051e9b58628b09e77cca396306c9022b90c0.tar.gz | |
config: drop `git_config_get()` wrapper
In 036876a1067 (config: hide functions using `the_repository` by
default, 2024-08-13) we have moved around a bunch of functions in the
config subsystem that depend on `the_repository`. Those function have
been converted into mere wrappers around their equivalent function that
takes in a repository as parameter, and the intent was that we'll
eventually remove those wrappers to make the dependency on the global
repository variable explicit at the callsite.
Follow through with that intent and remove `git_config_get()`. All
callsites are adjusted so that they use `repo_config_get(the_repository,
...)` instead. While some callsites might already have a repository
available, this mechanical conversion is the exact same as the current
situation and thus cannot cause any regression. Those sites should
eventually be cleaned up in a later patch series.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/submodule--helper.c')
| -rw-r--r-- | builtin/submodule--helper.c | 6 |
1 files changed, 3 insertions, 3 deletions
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 |
