git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 02/13] commit-graph: stop depending on `struct odb_source`

From
Karthik Nayak <karthik.188@gmail.com>
Date
Oct 6, 2026, 20:11 UTC
Message-ID
<CAOLa=ZSbgtBStEWz_gnqDTUVp_GdFfu0qghq_rzzfqUPqb3Stg@mail.gmail.com>
In-Reply-To
<asTnDMrTjUWHVSwR@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 9 quoted lines
> On Mon, Oct 05, 2026 at 03:43:44PM -0400, Karthik Nayak wrote:
>> Patrick Steinhardt <ps@pks.im> writes:
>>
>> [snip]
>
> Thanks for trimming! One more ask though: it's helpful to retain the
> diff header itself so that one knows which file this is that you are
> commenting on :)
>
Sure! Next time!
Show 28 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`?
>
> I'd agree if this were a properly designed function. But it's basically
> just a hack for our test suite, so I was aiming for the easiest fix
> possible to make this work.
>
> Patrick
All good!
Previous: Patrick SteinhardtNext: Patrick Steinhardt
Message 8 of 41 in “odb/source-files: move alternates into the backend”
  1. 00/13 odb/source-files: move alternates into the backendPatrick Steinhardt, Oct 2, 2026
  2. 01/13 commit-graph: require resolved packfile paths for `stdin_packs`Patrick Steinhardt, Oct 2, 2026
  3. Karthik NayakOct 5, 2026
  4. Patrick SteinhardtOct 6, 2026
  5. 02/13 commit-graph: stop depending on `struct odb_source`Patrick Steinhardt, Oct 2, 2026
  6. Karthik NayakOct 5, 2026
  7. Patrick SteinhardtOct 6, 2026
  8. Karthik NayakOct 6, 2026
  9. 03/13 odb/source-files: introduce `struct odb_files_dir`Patrick Steinhardt, Oct 2, 2026
  10. 04/13 odb: refactor `odb_for_each_alternate()` to yield dirsPatrick Steinhardt, Oct 2, 2026
  11. Karthik NayakOct 6, 2026
  12. 05/13 odb: refactor `odb_find_source()` to yield dirsPatrick Steinhardt, Oct 2, 2026
  13. 06/13 odb/source-files: add the ability to have multiple object dirsPatrick Steinhardt, Oct 2, 2026
  14. 07/13 tmp-objdir: absorb logic to set and restore primary sourcesPatrick Steinhardt, Oct 2, 2026
  15. 08/13 tmp-objdir: manage quarantine as an object directoryPatrick Steinhardt, Oct 2, 2026
  16. Karthik NayakOct 6, 2026
  17. Karthik NayakOct 6, 2026
  18. 09/13 tmp-objdir: replace primary source at creation timePatrick Steinhardt, Oct 2, 2026
  19. 10/13 odb/source: make `will_destroy` an implementation detailPatrick Steinhardt, Oct 2, 2026
  20. 11/13 odb/source-files: extract reading alternatesPatrick Steinhardt, Oct 2, 2026
  21. 12/13 odb/source-files: move alternates into the backendPatrick Steinhardt, Oct 2, 2026
  22. Karthik NayakOct 6, 2026
  23. Patrick SteinhardtOct 7, 2026
  24. 13/13 odb/source: drop `read_alternates` callbackPatrick Steinhardt, Oct 2, 2026
  25. Karthik NayakOct 6, 2026
  26. Patrick SteinhardtOct 7, 2026
  27. 00/13 odb/source-files: move alternates into the backendPatrick Steinhardt, Oct 8, 2026
  28. 01/13 commit-graph: require resolved packfile paths for `stdin_packs`Patrick Steinhardt, Oct 8, 2026
  29. 02/13 commit-graph: stop depending on `struct odb_source`Patrick Steinhardt, Oct 8, 2026
  30. 03/13 odb/source-files: introduce `struct odb_files_dir`Patrick Steinhardt, Oct 8, 2026
  31. 04/13 odb: refactor `odb_for_each_alternate()` to yield dirsPatrick Steinhardt, Oct 8, 2026
  32. 05/13 odb: refactor `odb_find_source()` to yield dirsPatrick Steinhardt, Oct 8, 2026
  33. 06/13 odb/source-files: add the ability to have multiple object dirsPatrick Steinhardt, Oct 8, 2026
  34. 07/13 tmp-objdir: absorb logic to set and restore primary sourcesPatrick Steinhardt, Oct 8, 2026
  35. 08/13 tmp-objdir: manage quarantine as an object directoryPatrick Steinhardt, Oct 8, 2026
  36. 09/13 tmp-objdir: replace primary source at creation timePatrick Steinhardt, Oct 8, 2026
  37. 10/13 odb/source: make `will_destroy` an implementation detailPatrick Steinhardt, Oct 8, 2026
  38. 11/13 odb/source-files: extract reading alternatesPatrick Steinhardt, Oct 8, 2026
  39. 12/13 odb/source-files: move alternates into the backendPatrick Steinhardt, Oct 8, 2026
  40. 13/13 odb/source: drop `read_alternates` callbackPatrick Steinhardt, Oct 8, 2026
  41. Karthik NayakOct 8, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.