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>

Stefan Beller committed Nov 22, 2016 at 12:14 UTC e6ead0f2dba3bdd9c1250298a4d82ea05cec2333
1 file changed +2 -14
submodule-config.c
+2 -14
@@ -471,18 +471,6 @@ out:
471 return submodule;
472 }
473
474 -static const struct submodule *config_from_path(struct submodule_cache *cache,
475 - const unsigned char *commit_sha1, const char *path)
476 -{
477 - return config_from(cache, commit_sha1, path, lookup_path);
478 -}
479 -
480 -static const struct submodule *config_from_name(struct submodule_cache *cache,
481 - const unsigned char *commit_sha1, const char *name)
482 -{
483 - return config_from(cache, commit_sha1, name, lookup_name);
484 -}
485 -
474 static void ensure_cache_init(void)
475 {
476 if (is_cache_init)
@@ -508,14 +496,14 @@ const struct submodule *submodule_from_name(const unsigned char *commit_sha1,
496 const char *name)
497 {
498 ensure_cache_init();
511 - return config_from_name(&the_submodule_cache, commit_sha1, name);
499 + return config_from(&the_submodule_cache, commit_sha1, name, lookup_name);
500 }
501
502 const struct submodule *submodule_from_path(const unsigned char *commit_sha1,
503 const char *path)
504 {
505 ensure_cache_init();
518 - return config_from_path(&the_submodule_cache, commit_sha1, path);
506 + return config_from(&the_submodule_cache, commit_sha1, path, lookup_path);
507 }
508
509 void submodule_free(void)