diff options
author | Patrick Steinhardt <ps@pks.im> | 2025-07-01 14:22:20 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2025-07-01 14:46:36 -0700 |
commit | c44185f6c10fb2d306efe505112982a7c3b93789 (patch) | |
tree | 98e2f1411a2f14a3be954f8ef16f0ccf78d77005 /commit-graph.c | |
parent | 1b1679c6883f948b19599f11229ff61124b51733 (diff) |
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>
Diffstat (limited to 'commit-graph.c')
-rw-r--r-- | commit-graph.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/commit-graph.c b/commit-graph.c index 6ced5b366e..59265f8938 100644 --- a/commit-graph.c +++ b/commit-graph.c @@ -649,7 +649,7 @@ struct commit_graph *load_commit_graph_chain_fd_st(struct repository *r, count = st->st_size / (the_hash_algo->hexsz + 1); CALLOC_ARRAY(oids, count); - prepare_alt_odb(r); + odb_prepare_alternates(r->objects); for (i = 0; i < count; i++) { struct odb_source *source; @@ -778,7 +778,7 @@ static int prepare_commit_graph(struct repository *r) if (!commit_graph_compatible(r)) return 0; - prepare_alt_odb(r); + odb_prepare_alternates(r->objects); for (source = r->objects->sources; !r->objects->commit_graph && source; source = source->next) |