mirror of
https://github.com/git/git.git
synced 2026-01-09 17:46:37 +00:00
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>
This commit is contained in:
committed by
Junio C Hamano
parent
f1782d185b
commit
965f8991e5
3
refs.h
3
refs.h
@@ -954,7 +954,8 @@ struct ref_store *get_main_ref_store(struct repository *r);
|
||||
* For backwards compatibility, submodule=="" is treated the same as
|
||||
* submodule==NULL.
|
||||
*/
|
||||
struct ref_store *get_submodule_ref_store(const char *submodule);
|
||||
struct ref_store *repo_get_submodule_ref_store(struct repository *repo,
|
||||
const char *submodule);
|
||||
struct ref_store *get_worktree_ref_store(const struct worktree *wt);
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user