]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'jt/add-submodule-odb-clean-up'
authorJunio C Hamano <gitster@pobox.com>
Wed, 6 Oct 2021 20:40:10 +0000 (13:40 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 6 Oct 2021 20:40:11 +0000 (13:40 -0700)
More code paths that use the hack to add submodule's object
database to the set of alternate object store have been cleaned up.

* jt/add-submodule-odb-clean-up:
  revision: remove "submodule" from opt struct
  repository: support unabsorbed in repo_submodule_init
  submodule: remove unnecessary unabsorbed fallback

1  2 
builtin/ls-files.c
builtin/submodule--helper.c
merge-ort.c
merge-recursive.c
repository.c
revision.c
revision.h
submodule.c

Simple merge
Simple merge
diff --cc merge-ort.c
Simple merge
Simple merge
diff --cc repository.c
index 710a3b4bf872fb0db64f859d5c49d085c198f089,e4a1afb0acac4cee810ae2f6a5af4334f9cdc572..c5b90ba93ea816c62eeaf73433e65e2730827063
@@@ -212,8 -208,16 +208,15 @@@ int repo_submodule_init(struct reposito
                 * in the superproject's 'modules' directory.  In this case the
                 * submodule would not have a worktree.
                 */
+               const struct submodule *sub =
+                       submodule_from_path(superproject, treeish_name, path);
+               if (!sub) {
+                       ret = -1;
+                       goto out;
+               }
                strbuf_reset(&gitdir);
 -              strbuf_repo_git_path(&gitdir, superproject,
 -                                   "modules/%s", sub->name);
 +              submodule_name_to_gitdir(&gitdir, superproject, sub->name);
  
                if (repo_init(subrepo, gitdir.buf, NULL)) {
                        ret = -1;
diff --cc revision.c
Simple merge
diff --cc revision.h
Simple merge
diff --cc submodule.c
Simple merge