Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-07-18 22:20:31 +0300
committerJunio C Hamano <gitster@pobox.com>2018-07-18 22:20:31 +0300
commitb9632c9d95f601c3d557cdbad60c06fcc7d30110 (patch)
treebe604c30d9bfc2ef04d9fd0484dd108326e90519 /config.c
parentd18602f4123ad61b094aff5b2822774cf020e70e (diff)
parentdb64d1127f5c76b721830ba390176cf0d6e59d74 (diff)
Merge branch 'ao/config-from-gitmodules'
Tighten the API to make it harder to misuse in-tree .gitmodules file, even though it shares the same syntax with configuration files, to read random configuration items from it. * ao/config-from-gitmodules: submodule-config: reuse config_from_gitmodules in repo_read_gitmodules submodule-config: pass repository as argument to config_from_gitmodules submodule-config: make 'config_from_gitmodules' private submodule-config: add helper to get 'update-clone' config from .gitmodules submodule-config: add helper function to get 'fetch' config from .gitmodules config: move config_from_gitmodules to submodule-config.c
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 139c903f6b..7968ef7566 100644
--- a/config.c
+++ b/config.c
@@ -2173,23 +2173,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);