MCPcopy Index your code
hub / github.com/git/git / config_submodule_in_gitmodules

Function config_submodule_in_gitmodules

builtin/submodule--helper.c:3503–3516  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3501}
3502
3503static int config_submodule_in_gitmodules(const char *name, const char *var, const char *value)
3504{
3505 char *key;
3506 int ret;
3507
3508 if (!is_writing_gitmodules_ok())
3509 die(_("please make sure that the .gitmodules file is in the working tree"));
3510
3511 key = xstrfmt("submodule.%s.%s", name, var);
3512 ret = config_set_in_gitmodules_file_gently(key, value);
3513 free(key);
3514
3515 return ret;
3516}
3517
3518static void configure_added_submodule(struct add_data *add_data)
3519{

Callers 1

Calls 4

is_writing_gitmodules_okFunction · 0.85
xstrfmtFunction · 0.85
dieFunction · 0.50

Tested by

no test coverage detected