]> git.ipfire.org Git - thirdparty/git.git/commitdiff
submodule config: inline config_from_{name, path}
authorStefan Beller <sbeller@google.com>
Tue, 22 Nov 2016 20:14:36 +0000 (12:14 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 22 Nov 2016 22:43:03 +0000 (14:43 -0800)
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>
submodule-config.c

index 098085be69b97687b0febfe9e29c6dc0c64569a1..15ffab6af40f374b5dacf12701e1725b178ea7bc 100644 (file)
@@ -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)