Merge branch 'jt/add-submodule-odb-clean-up'

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
This commit is contained in:
Junio C Hamano
2021-10-06 13:40:10 -07:00
11 changed files with 103 additions and 98 deletions

View File

@ -2766,7 +2766,6 @@ static int push_check(int argc, const char **argv, const char *prefix)
static int ensure_core_worktree(int argc, const char **argv, const char *prefix)
{
const struct submodule *sub;
const char *path;
const char *cw;
struct repository subrepo;
@ -2776,11 +2775,7 @@ static int ensure_core_worktree(int argc, const char **argv, const char *prefix)
path = argv[1];
sub = submodule_from_path(the_repository, null_oid(), path);
if (!sub)
BUG("We could get the submodule handle before?");
if (repo_submodule_init(&subrepo, the_repository, sub))
if (repo_submodule_init(&subrepo, the_repository, path, null_oid()))
die(_("could not get a repository handle for submodule '%s'"), path);
if (!repo_config_get_string_tmp(&subrepo, "core.worktree", &cw)) {