[go: up one dir, main page]

Centralize management of object database sources

Hi,

currently, the creation of the object databases is handled both by "setup.c" and by "odb.c". While it's expected that "setup.c" is the one setting up the object database itself, what's less so is that there is a shared responsibility for managing its sources:

  • The primary object database source gets created in "setup.c".

  • The temporary source used during ODB transactions is handled by "setup.c" when changing the current working directory.

  • Relative paths stored in object database sources get updated by "setup.c" when changing the current working directory.

This means that the management of ODB sources is somewhat cluttered and thus hard to understand. Furthermore, it has the consequence that "setup.c" reaches into internals of the ODB that really shouldn't be any of its concern.

This patch series cleans that up and moves all handling of ODB sources into "odb.c". This hopefully makes the logic easier to understand and it will allow us to eventually handle the logic for different backends in a single central location.

The series is structured as follows:

  • Patches 1 to 5 clean up some smaller nuisances in the vicinity.

  • Patches 6 to 9 refactor a couple of callsites that play weird games with the object database. These cause us to re-initialize the ODB multiple times, which will not be allowed anymore at the end of this series.

  • Patches 10 to 13 move the logic that manages object sources from "setup.c" into "odb.c".

The series is based on

Thanks!

Patrick

To: git@vger.kernel.org

--- b4-submit-tracking ---

This section is used internally by b4 prep for tracking purposes.

{ "series": { "revision": 1, "change-id": "20251107-b4-pks-odb-creation-96c18fdab1d2", "prefixes": [] } }

Closes Move creation of ODB sources into `odb_new()` (#615 - closed).

Merge request reports

Loading