| 150 | } |
| 151 | |
| 152 | static 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 | |
| 176 | static int cmd__submodule_config_unset(int argc, const char **argv) |
| 177 | { |
nothing calls this directly
no test coverage detected