aboutsummaryrefslogtreecommitdiffstats
path: root/submodule.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-08-13 11:14:12 +0200
committerJunio C Hamano <gitster@pobox.com>2024-08-13 10:01:04 -0700
commit76fc9906f2121dd4abd42a4c6c2d864c40736b3a (patch)
tree7b7d99a0887289cf54e0de9bd31a32bd7b74e558 /submodule.c
parent0c2c37d16b170697e7c97be5db7dca58b877c4e5 (diff)
downloadgit-76fc9906f2121dd4abd42a4c6c2d864c40736b3a.tar.gz
config: pass repo to functions that rename or copy sections
Refactor functions that rename or copy config sections to accept a `struct repository` such that we can get rid of the implicit dependency on `the_repository`. Rename the functions accordingly. 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 ab99a30253..bc04fc8284 100644
--- a/submodule.c
+++ b/submodule.c
@@ -159,7 +159,7 @@ int remove_path_from_gitmodules(const char *path)
}
strbuf_addstr(&sect, "submodule.");
strbuf_addstr(&sect, submodule->name);
- if (git_config_rename_section_in_file(GITMODULES_FILE, sect.buf, NULL) < 0) {
+ if (repo_config_rename_section_in_file(the_repository, GITMODULES_FILE, sect.buf, NULL) < 0) {
/* Maybe the user already did that, don't error out here */
warning(_("Could not remove .gitmodules entry for %s"), path);
strbuf_release(&sect);