MCPcopy Create free account
hub / github.com/git/git / cmd__submodule_config_set

Function cmd__submodule_config_set

t/helper/test-submodule.c:152–174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150}
151
152static int cmd__submodule_config_set(int argc, const char **argv)
153{
154 struct option options[] = {
155 OPT_END()
156 };
157 const char *const usage[] = {
158 "test-tool submodule config-set <key> <value>",
159 NULL
160 };
161 argc = parse_options(argc, argv, "test-tools", options, usage,
162 PARSE_OPT_KEEP_ARGV0);
163
164 setup_git_directory(the_repository);
165
166 /* Equivalent to ACTION_SET in builtin/config.c */
167 if (argc == 3) {
168 if (!is_writing_gitmodules_ok())
169 die("please make sure that the .gitmodules file is in the working tree");
170
171 return config_set_in_gitmodules_file_gently(argv[1], argv[2]);
172 }
173 usage_with_options(usage, options);
174}
175
176static int cmd__submodule_config_unset(int argc, const char **argv)
177{

Callers

nothing calls this directly

Calls 6

parse_optionsFunction · 0.85
setup_git_directoryFunction · 0.85
is_writing_gitmodules_okFunction · 0.85
usage_with_optionsFunction · 0.85
dieFunction · 0.50

Tested by

no test coverage detected