summaryrefslogtreecommitdiff
path: root/submodule-config.c
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2016-11-22 20:14:36 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-11-22 22:43:03 (GMT)
commite6ead0f2dba3bdd9c1250298a4d82ea05cec2333 (patch)
tree4ca1f3f760238fb674c21208ac7c7d124f1c2207 /submodule-config.c
parentbe5a750939c212bc0781ffa04fabcfd2b2bd744e (diff)
downloadgit-e6ead0f2dba3bdd9c1250298a4d82ea05cec2333.zip
git-e6ead0f2dba3bdd9c1250298a4d82ea05cec2333.tar.gz
git-e6ead0f2dba3bdd9c1250298a4d82ea05cec2333.tar.bz2
submodule config: inline config_from_{name, path}
There is no other user of config_from_{name, path}, such that there is no reason for the existence of these one liner functions. Just inline these to increase readability. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> Reviewed-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.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/submodule-config.c b/submodule-config.c
index 098085b..15ffab6 100644
--- a/submodule-config.c
+++ b/submodule-config.c
@@ -471,18 +471,6 @@ out:
return submodule;
}
-static const struct submodule *config_from_path(struct submodule_cache *cache,
- const unsigned char *commit_sha1, const char *path)
-{
- return config_from(cache, commit_sha1, path, lookup_path);
-}
-
-static const struct submodule *config_from_name(struct submodule_cache *cache,
- const unsigned char *commit_sha1, const char *name)
-{
- return config_from(cache, commit_sha1, name, lookup_name);
-}
-
static void ensure_cache_init(void)
{
if (is_cache_init)
@@ -508,14 +496,14 @@ const struct submodule *submodule_from_name(const unsigned char *commit_sha1,
const char *name)
{
ensure_cache_init();
- return config_from_name(&the_submodule_cache, commit_sha1, name);
+ return config_from(&the_submodule_cache, commit_sha1, name, lookup_name);
}
const struct submodule *submodule_from_path(const unsigned char *commit_sha1,
const char *path)
{
ensure_cache_init();
- return config_from_path(&the_submodule_cache, commit_sha1, path);
+ return config_from(&the_submodule_cache, commit_sha1, path, lookup_path);
}
void submodule_free(void)