diff options
Diffstat (limited to 't/helper/test-submodule-nested-repo-config.c')
| -rw-r--r-- | t/helper/test-submodule-nested-repo-config.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/t/helper/test-submodule-nested-repo-config.c b/t/helper/test-submodule-nested-repo-config.c index c5fd4527dc..2710341cd5 100644 --- a/t/helper/test-submodule-nested-repo-config.c +++ b/t/helper/test-submodule-nested-repo-config.c @@ -1,4 +1,8 @@ +#define USE_THE_REPOSITORY_VARIABLE + #include "test-tool.h" +#include "repository.h" +#include "setup.h" #include "submodule-config.h" static void die_usage(const char **argv, const char *msg) @@ -11,15 +15,13 @@ static void die_usage(const char **argv, const char *msg) int cmd__submodule_nested_repo_config(int argc, const char **argv) { struct repository subrepo; - const struct submodule *sub; if (argc < 3) die_usage(argv, "Wrong number of arguments."); setup_git_directory(); - sub = submodule_from_path(the_repository, &null_oid, argv[1]); - if (repo_submodule_init(&subrepo, the_repository, sub)) { + if (repo_submodule_init(&subrepo, the_repository, argv[1], null_oid(the_hash_algo))) { die_usage(argv, "Submodule not found."); } @@ -27,6 +29,6 @@ int cmd__submodule_nested_repo_config(int argc, const char **argv) print_config_from_gitmodules(&subrepo, argv[2]); submodule_free(the_repository); - + repo_clear(&subrepo); return 0; } |
