summaryrefslogtreecommitdiff
path: root/submodule.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2025-07-23 16:08:36 +0200
committerJunio C Hamano <gitster@pobox.com>2025-07-23 08:15:21 -0700
commit62c1ed3e9d03b7434fd86c257fa04abe47e7b626 (patch)
tree217b77b7908420cd91f8b6108cf4a8878731b515 /submodule.c
parente957ed2b275b3fd44475bacaf3955cf451a976c4 (diff)
config: drop `git_config_set_in_file_gently()` 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_set_in_file_gently()`. All callsites are adjusted so that they use `repo_config_set_in_file_gently(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 'submodule.c')
-rw-r--r--submodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/submodule.c b/submodule.c
index f8373a9ea7..fff3c75570 100644
--- a/submodule.c
+++ b/submodule.c
@@ -2058,7 +2058,7 @@ void submodule_unset_core_worktree(const struct submodule *sub)
submodule_name_to_gitdir(&config_path, the_repository, sub->name);
strbuf_addstr(&config_path, "/config");
- if (git_config_set_in_file_gently(config_path.buf, "core.worktree", NULL, NULL))
+ if (repo_config_set_in_file_gently(the_repository, config_path.buf, "core.worktree", NULL, NULL))
warning(_("Could not unset core.worktree setting in submodule '%s'"),
sub->path);