From 46bbc8651579a572040c41bf7ff5d698e62758f7 Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Fri, 11 Sep 2026 07:51:55 +0200 Subject: [PATCH] t/helper: stop registering alternates in "ref-store" command When using the "ref-store" command we support access to multiple different reference stores. As part of that we allow the caller to explicitly exercise stores of a submodule. This allows us to verify low-level behaviour of submodule stores, which is exercised in t1406. When doing so we also link the submodule's object database into the main object database. The intent of this is that it allows us to access objects of the submodule, too. But that functionality is not even needed anymore: when creating a submodule reference store, we will first initialize the submodule repository and then initialize the store with that repository. And as the reference subsystem doesn't depend on `the_repository` anymore all subsequent object lookups performed by the reference store will be routed to the submodule repository. It is thus not needed anymore to register the submodule object store with the main object database. Remove the call. Signed-off-by: Patrick Steinhardt Signed-off-by: Junio C Hamano --- t/helper/test-ref-store.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/t/helper/test-ref-store.c b/t/helper/test-ref-store.c index 5a9a3053d9..db58f00589 100644 --- a/t/helper/test-ref-store.c +++ b/t/helper/test-ref-store.c @@ -74,14 +74,6 @@ static const char **get_store(const char **argv, struct ref_store **refs) } else if (!strcmp(argv[0], "main")) { *refs = get_main_ref_store(the_repository); } else if (skip_prefix(argv[0], "submodule:", &gitdir)) { - struct strbuf sb = STRBUF_INIT; - - if (!repo_submodule_path_append(the_repository, - &sb, gitdir, "objects/")) - die("computing submodule path failed"); - odb_add_to_alternates_memory(the_repository->objects, sb.buf); - strbuf_release(&sb); - *refs = repo_get_submodule_ref_store(the_repository, gitdir); } else if (skip_prefix(argv[0], "worktree:", &gitdir)) { struct worktree **p, **worktrees = get_worktrees(the_repository);