diff options
author | Jonathan Tan <jonathantanmy@google.com> | 2021-09-09 20:47:28 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-09-09 23:09:30 +0200 |
commit | 8eb8dcf94643ca6e7c3f040f3e0bf96e11c7ae47 (patch) | |
tree | f7e2ee9926bed0f5382f492687ca830a599c993c /builtin/ls-files.c | |
parent | submodule: remove unnecessary unabsorbed fallback (diff) | |
download | git-8eb8dcf94643ca6e7c3f040f3e0bf96e11c7ae47.tar.xz git-8eb8dcf94643ca6e7c3f040f3e0bf96e11c7ae47.zip |
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 'builtin/ls-files.c')
-rw-r--r-- | builtin/ls-files.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/builtin/ls-files.c b/builtin/ls-files.c index 29a26ad8ae..ec19bf54b2 100644 --- a/builtin/ls-files.c +++ b/builtin/ls-files.c @@ -209,10 +209,8 @@ static void show_submodule(struct repository *superproject, struct dir_struct *dir, const char *path) { struct repository subrepo; - const struct submodule *sub = submodule_from_path(superproject, - null_oid(), path); - if (repo_submodule_init(&subrepo, superproject, sub)) + if (repo_submodule_init(&subrepo, superproject, path, null_oid())) return; if (repo_read_index(&subrepo) < 0) |