]>
git.ipfire.org Git - thirdparty/git.git/blob - t/helper/test-submodule-nested-repo-config.c
2 #include "repository.h"
4 #include "submodule-config.h"
6 static void die_usage(const char **argv
, const char *msg
)
8 fprintf(stderr
, "%s\n", msg
);
9 fprintf(stderr
, "Usage: %s <submodulepath> <config name>\n", argv
[0]);
13 int cmd__submodule_nested_repo_config(int argc
, const char **argv
)
15 struct repository subrepo
;
18 die_usage(argv
, "Wrong number of arguments.");
20 setup_git_directory();
22 if (repo_submodule_init(&subrepo
, the_repository
, argv
[1], null_oid())) {
23 die_usage(argv
, "Submodule not found.");
26 /* Read the config of _child_ submodules. */
27 print_config_from_gitmodules(&subrepo
, argv
[2]);
29 submodule_free(the_repository
);