summaryrefslogtreecommitdiff
path: root/t/helper
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-01-29 20:47:54 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-01-29 20:47:54 (GMT)
commit5d3635db19c6dff4fb063fabfa4161fd3b8285f0 (patch)
tree30671c79e96d06267eda7d088a4ef7fd86c3ad47 /t/helper
parentf33989464ecfc05a937328430b7e74819f7285dd (diff)
parentbe76c2128234d94b47f7087152ee55d08bb65d88 (diff)
downloadgit-5d3635db19c6dff4fb063fabfa4161fd3b8285f0.zip
git-5d3635db19c6dff4fb063fabfa4161fd3b8285f0.tar.gz
git-5d3635db19c6dff4fb063fabfa4161fd3b8285f0.tar.bz2
Merge branch 'sb/submodule-recursive-fetch-gets-the-tip'
"git fetch --recurse-submodules" may not fetch the necessary commit that is bound to the superproject, which is getting corrected. * sb/submodule-recursive-fetch-gets-the-tip: fetch: ensure submodule objects fetched submodule.c: fetch in submodules git directory instead of in worktree submodule: migrate get_next_submodule to use repository structs repository: repo_submodule_init to take a submodule struct submodule: store OIDs in changed_submodule_names submodule.c: tighten scope of changed_submodule_names struct submodule.c: sort changed_submodule_names before searching it submodule.c: fix indentation sha1-array: provide oid_array_filter
Diffstat (limited to 't/helper')
-rw-r--r--t/helper/test-submodule-nested-repo-config.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/t/helper/test-submodule-nested-repo-config.c b/t/helper/test-submodule-nested-repo-config.c
index a31e2a9..bc97929 100644
--- a/t/helper/test-submodule-nested-repo-config.c
+++ b/t/helper/test-submodule-nested-repo-config.c
@@ -10,19 +10,21 @@ static void die_usage(int argc, const char **argv, const char *msg)
int cmd__submodule_nested_repo_config(int argc, const char **argv)
{
- struct repository submodule;
+ struct repository subrepo;
+ const struct submodule *sub;
if (argc < 3)
die_usage(argc, argv, "Wrong number of arguments.");
setup_git_directory();
- if (repo_submodule_init(&submodule, the_repository, argv[1])) {
+ sub = submodule_from_path(the_repository, &null_oid, argv[1]);
+ if (repo_submodule_init(&subrepo, the_repository, sub)) {
die_usage(argc, argv, "Submodule not found.");
}
/* Read the config of _child_ submodules. */
- print_config_from_gitmodules(&submodule, argv[2]);
+ print_config_from_gitmodules(&subrepo, argv[2]);
submodule_free(the_repository);