summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorAntonio Ospite <ao2@ao2.it>2018-06-26 10:47:05 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-06-26 19:56:11 (GMT)
commitad136370b2a26fd55f446722ff7bf5b383e8eca0 (patch)
tree3c1df9d011449e4720af32bf42fd52c95b4692a4 /config.c
parented843436dd4924c10669820cc73daf50f0b4dabd (diff)
downloadgit-ad136370b2a26fd55f446722ff7bf5b383e8eca0.zip
git-ad136370b2a26fd55f446722ff7bf5b383e8eca0.tar.gz
git-ad136370b2a26fd55f446722ff7bf5b383e8eca0.tar.bz2
config: move config_from_gitmodules to submodule-config.c
The .gitmodules file is not meant as a place to store arbitrary configuration to distribute with the repository. Move config_from_gitmodules() out of config.c and into submodule-config.c to make it even clearer that it is not a mechanism to retrieve arbitrary configuration from 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 'config.c')
-rw-r--r--config.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/config.c b/config.c
index a0a6ae1..fa78b1f 100644
--- a/config.c
+++ b/config.c
@@ -2172,23 +2172,6 @@ int git_config_get_pathname(const char *key, const char **dest)
return repo_config_get_pathname(the_repository, key, dest);
}
-/*
- * 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.
- *
- * Runs the provided config function on the '.gitmodules' file found in the
- * working directory.
- */
-void config_from_gitmodules(config_fn_t fn, void *data)
-{
- if (the_repository->worktree) {
- char *file = repo_worktree_path(the_repository, GITMODULES_FILE);
- git_config_from_file(fn, file, data);
- free(file);
- }
-}
-
int git_config_get_expiry(const char *key, const char **output)
{
int ret = git_config_get_string_const(key, output);