2 #include "submodule-config.h"
4 static void die_usage(int argc, const char **argv, const char *msg)
6 fprintf(stderr, "%s\n", msg);
7 fprintf(stderr, "Usage: %s <submodulepath> <config name>\n", argv[0]);
11 int cmd__submodule_nested_repo_config(int argc, const char **argv)
13 struct repository submodule;
16 die_usage(argc, argv, "Wrong number of arguments.");
18 setup_git_directory();
20 if (repo_submodule_init(&submodule, the_repository, argv[1])) {
21 die_usage(argc, argv, "Submodule not found.");
24 /* Read the config of _child_ submodules. */
25 print_config_from_gitmodules(&submodule, argv[2]);
27 submodule_free(the_repository);