diff options
Diffstat (limited to 'submodule-config.c')
-rw-r--r-- | submodule-config.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/submodule-config.c b/submodule-config.c index ea82edb11..c64faf3d6 100644 --- a/submodule-config.c +++ b/submodule-config.c @@ -422,6 +422,18 @@ static void ensure_cache_init(void) is_cache_init = 1; } +int parse_submodule_config_option(const char *var, const char *value) +{ + struct parse_config_parameter parameter; + parameter.cache = &cache; + parameter.commit_sha1 = NULL; + parameter.gitmodules_sha1 = null_sha1; + parameter.overwrite = 1; + + ensure_cache_init(); + return parse_config(var, value, ¶meter); +} + const struct submodule *submodule_from_name(const unsigned char *commit_sha1, const char *name) { |