diff options
author | Patrick Steinhardt <ps@pks.im> | 2025-07-01 14:22:17 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2025-07-01 14:46:35 -0700 |
commit | bd52ea343d2af91574fedcf765250f44f3d624d4 (patch) | |
tree | bece7d934b61e20a4641262a7f45c7e39e860a44 /builtin/commit-graph.c | |
parent | 2f5181fce6c6353f9c743d9d396fbf06527688c7 (diff) |
odb: get rid of `the_repository` in `find_odb()`
Get rid of our dependency on `the_repository` in `find_odb()` by passing
in the object database in which we want to search for the source and
adjusting all callers.
Rename the function to `odb_find_source()`.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit-graph.c')
-rw-r--r-- | builtin/commit-graph.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/commit-graph.c b/builtin/commit-graph.c index f04eaba525..77d7e88a98 100644 --- a/builtin/commit-graph.c +++ b/builtin/commit-graph.c @@ -101,7 +101,7 @@ static int graph_verify(int argc, const char **argv, const char *prefix, if (opts.progress) flags |= COMMIT_GRAPH_WRITE_PROGRESS; - source = find_odb(the_repository, opts.obj_dir); + source = odb_find_source(the_repository->objects, opts.obj_dir); graph_name = get_commit_graph_filename(source); chain_name = get_commit_graph_chain_filename(source); if (open_commit_graph(graph_name, &fd, &st)) @@ -289,7 +289,7 @@ static int graph_write(int argc, const char **argv, const char *prefix, git_env_bool(GIT_TEST_COMMIT_GRAPH_CHANGED_PATHS, 0)) flags |= COMMIT_GRAPH_WRITE_BLOOM_FILTERS; - source = find_odb(the_repository, opts.obj_dir); + source = odb_find_source(the_repository->objects, opts.obj_dir); if (opts.reachable) { if (write_commit_graph_reachable(source, flags, &write_opts)) |