diff options
author | Jonathan Tan <jonathantanmy@google.com> | 2021-09-09 11:47:28 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-09-09 14:09:30 -0700 |
commit | 8eb8dcf94643ca6e7c3f040f3e0bf96e11c7ae47 (patch) | |
tree | f7e2ee9926bed0f5382f492687ca830a599c993c /t/helper | |
parent | submodule: remove unnecessary unabsorbed fallback (diff) | |
download | tgif-8eb8dcf94643ca6e7c3f040f3e0bf96e11c7ae47.tar.xz |
repository: support unabsorbed in repo_submodule_init
In preparation for a subsequent commit that migrates code using
add_submodule_odb() to repo_submodule_init(), teach
repo_submodule_init() to support submodules with unabsorbed gitdirs.
(See the documentation for "git submodule absorbgitdirs" for more
information about absorbed and unabsorbed gitdirs.)
Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/helper')
-rw-r--r-- | t/helper/test-submodule-nested-repo-config.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/t/helper/test-submodule-nested-repo-config.c b/t/helper/test-submodule-nested-repo-config.c index e3f11ff5a7..dc1c14bde3 100644 --- a/t/helper/test-submodule-nested-repo-config.c +++ b/t/helper/test-submodule-nested-repo-config.c @@ -11,15 +11,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())) { die_usage(argv, "Submodule not found."); } |