submodule: remove gitmodules_config

Now that the submodule-config subsystem can lazily read the gitmodules
file we no longer need to explicitly pre-read the gitmodules by calling
'gitmodules_config()' so let's remove it.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Brandon Williams
2017-08-03 11:20:00 -07:00
committed by Junio C Hamano
parent 3302871320
commit 557a5998df
16 changed files with 0 additions and 53 deletions

View File

@ -208,19 +208,6 @@ int option_parse_recurse_submodules_worktree_updater(const struct option *opt,
return 0;
}
void load_submodule_cache(void)
{
if (config_update_recurse_submodules == RECURSE_SUBMODULES_OFF)
return;
gitmodules_config();
}
void gitmodules_config(void)
{
repo_read_gitmodules(the_repository);
}
/*
* Determine if a submodule has been initialized at a given 'path'
*/
@ -1093,7 +1080,6 @@ int submodule_touches_in_range(struct object_id *excl_oid,
struct argv_array args = ARGV_ARRAY_INIT;
int ret;
gitmodules_config();
/* No need to check if there are no submodules configured */
if (!submodule_from_path(NULL, NULL))
return 0;
@ -2000,7 +1986,6 @@ int submodule_to_gitdir(struct strbuf *buf, const char *submodule)
strbuf_addstr(buf, git_dir);
}
if (!is_git_directory(buf->buf)) {
gitmodules_config();
sub = submodule_from_path(&null_oid, submodule);
if (!sub) {
ret = -1;