Skip to content

Commit e6ead0f

Browse files
stefanbellergitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]> Reviewed-by: Brandon Williams <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent be5a750 commit e6ead0f

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

submodule-config.c

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -471,18 +471,6 @@ static const struct submodule *config_from(struct submodule_cache *cache,
471471
return submodule;
472472
}
473473

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-
486474
static void ensure_cache_init(void)
487475
{
488476
if (is_cache_init)
@@ -508,14 +496,14 @@ const struct submodule *submodule_from_name(const unsigned char *commit_sha1,
508496
const char *name)
509497
{
510498
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);
512500
}
513501

514502
const struct submodule *submodule_from_path(const unsigned char *commit_sha1,
515503
const char *path)
516504
{
517505
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);
519507
}
520508

521509
void submodule_free(void)

0 commit comments

Comments
 (0)