mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
odb: get rid of the_repository when handling alternates
The functions to manage alternates all depend on `the_repository`. Refactor them to accept an object database as a parameter and adjust all callers. The functions are renamed accordingly. Note that right now the situation is still somewhat weird because we end up using the object store path provided by the object store's repository anyway. Consequently, we could have instead passed in a pointer to the repository instead of passing in the pointer to the object store. This will be addressed in subsequent commits though, where we will start to use the path owned by the object store itself. 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
1b1679c688
commit
c44185f6c1
@@ -189,7 +189,8 @@ int register_all_submodule_odb_as_alternates(void)
|
||||
int ret = added_submodule_odb_paths.nr;
|
||||
|
||||
for (i = 0; i < added_submodule_odb_paths.nr; i++)
|
||||
add_to_alternates_memory(added_submodule_odb_paths.items[i].string);
|
||||
odb_add_to_alternates_memory(the_repository->objects,
|
||||
added_submodule_odb_paths.items[i].string);
|
||||
if (ret) {
|
||||
string_list_clear(&added_submodule_odb_paths, 0);
|
||||
trace2_data_intmax("submodule", the_repository,
|
||||
|
||||
Reference in New Issue
Block a user