summaryrefslogtreecommitdiff
path: root/submodule-config.c
diff options
context:
space:
mode:
authorAntonio Ospite <ao2@ao2.it>2018-06-26 10:47:08 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-06-26 19:56:12 (GMT)
commit588929d54d110024fcce6b427e28a8a428a93d88 (patch)
treef3db7247cf39a98ec659b893b1b79b4818bdf837 /submodule-config.c
parent057449978efe3e803d1d1ec382e1f238a405a833 (diff)
downloadgit-588929d54d110024fcce6b427e28a8a428a93d88.zip
git-588929d54d110024fcce6b427e28a8a428a93d88.tar.gz
git-588929d54d110024fcce6b427e28a8a428a93d88.tar.bz2
submodule-config: make 'config_from_gitmodules' private
Now that 'config_from_gitmodules' is not used in the open, it can be marked as private. Hopefully this will prevent its usage for retrieving arbitrary configuration form the '.gitmodules' file. Signed-off-by: Antonio Ospite <ao2@ao2.it> Acked-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'submodule-config.c')
-rw-r--r--submodule-config.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/submodule-config.c b/submodule-config.c
index 9a2b13d..cd1f1e0 100644
--- a/submodule-config.c
+++ b/submodule-config.c
@@ -673,14 +673,14 @@ void submodule_free(struct repository *r)
}
/*
- * Note: This function exists solely to maintain backward compatibility with
- * 'fetch' and 'update_clone' storing configuration in '.gitmodules' and should
- * NOT be used anywhere else.
+ * Note: This function is private for a reason, the '.gitmodules' file should
+ * not be used as as a mechanism to retrieve arbitrary configuration stored in
+ * the repository.
*
* Runs the provided config function on the '.gitmodules' file found in the
* working directory.
*/
-void config_from_gitmodules(config_fn_t fn, void *data)
+static void config_from_gitmodules(config_fn_t fn, void *data)
{
if (the_repository->worktree) {
char *file = repo_worktree_path(the_repository, GITMODULES_FILE);