Re: [PATCH 02/13] commit-graph: stop depending on `struct odb_source`
- From
Karthik Nayak <karthik.188@gmail.com>
- Date
- Oct 5, 2026, 19:43 UTC
- Message-ID
- <CAOLa=ZSNHWFw5Vj_5qg16ipp1QA0pDcV8h=hOA=ma4hy6F_LcQ@mail.gmail.com>
- In-Reply-To
- <20261002-pks-odb-move-alternates-v1-2-8a63507b88c4@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
[snip]
Show 18 quoted lines
> @@ -28,7 +29,7 @@
> #include "tree.h"
> #include "chunk-format.h"
>
> -void git_test_write_commit_graph_or_die(struct odb_source *source)
> +void git_test_write_commit_graph_or_die(struct repository *repo)
> {
> int flags = 0;
> if (!git_env_bool(GIT_TEST_COMMIT_GRAPH, 0))
> @@ -37,7 +38,7 @@ void git_test_write_commit_graph_or_die(struct odb_source *source)
> if (git_env_bool(GIT_TEST_COMMIT_GRAPH_CHANGED_PATHS, 0))
> flags = COMMIT_GRAPH_WRITE_BLOOM_FILTERS;
>
> - if (write_commit_graph_reachable(source, flags, NULL))
> + if (write_commit_graph_reachable(repo, repo->objects->sources->path, flags, NULL))
> die("failed to write commit-graph under GIT_TEST_COMMIT_GRAPH");
> }
>Shouldn't the caller of `git_test_write_commit_graph_or_die()` send in (repo, path) and we forward that path, instead of using the path from `repo->objects->sources->path`?