submodule-config: remove submodule_from_cache

This continues the story of bf12fcdf5e (submodule-config: store
the_submodule_cache in the_repository, 2017-06-22).

The previous patch taught submodule_from_path to take a repository into
account, such that submodule_from_{path, cache} are the same now.
Remove submodule_from_cache, migrating all its callers to
submodule_from_path.

Reviewed-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Stefan Beller <sbeller@google.com>
Reviewed-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Stefan Beller
2018-03-28 15:35:30 -07:00
committed by Junio C Hamano
parent 3b8fb393bc
commit 0c89fdd739
4 changed files with 3 additions and 15 deletions

View File

@ -635,15 +635,6 @@ const struct submodule *submodule_from_path(struct repository *r,
return config_from(r->submodule_cache, treeish_name, path, lookup_path);
}
const struct submodule *submodule_from_cache(struct repository *repo,
const struct object_id *treeish_name,
const char *key)
{
gitmodules_read_check(repo);
return config_from(repo->submodule_cache, treeish_name,
key, lookup_path);
}
void submodule_free(struct repository *r)
{
if (r->submodule_cache)