git/refs
Patrick Steinhardt 965f8991e5 refs: pass repo when retrieving submodule ref store
Looking up submodule ref stores has two deficiencies:

  - The initialized subrepo will be attributed to `the_repository`.

  - The submodule ref store will be tracked in a global map.

This makes it impossible to have submodule ref stores for a repository
other than `the_repository`.

Modify the function to accept the parent repository as parameter and
move the global map into `struct repository`. Like this it becomes
possible to look up submodule ref stores for arbitrary repositories.

Note that this also adds a new reference to `the_repository` in
`resolve_gitlink_ref()`, which is part of the refs interfaces. This will
get adjusted in the next patch.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-05-17 10:33:37 -07:00
..
debug.c refs: implement releasing ref storages 2024-05-17 10:33:37 -07:00
files-backend.c refs: implement releasing ref storages 2024-05-17 10:33:37 -07:00
iterator.c refs: always treat iterators as ordered 2024-02-21 09:58:06 -08:00
packed-backend.c refs: implement releasing ref storages 2024-05-17 10:33:37 -07:00
packed-backend.h refs: adjust names for init and init_db callbacks 2024-05-17 10:33:36 -07:00
ref-cache.c refs: always treat iterators as ordered 2024-02-21 09:58:06 -08:00
ref-cache.h hash-ll.h: split out of hash.h to remove dependency on repository.h 2023-04-24 12:47:32 -07:00
refs-internal.h refs: pass repo when retrieving submodule ref store 2024-05-17 10:33:37 -07:00
reftable-backend.c refs: implement releasing ref storages 2024-05-17 10:33:37 -07:00