odb: make object database sources pluggable

Hi,

this patch series finally makes the object database source pluggable. This is done by moving backend-specific logics into callback functions that are part of struct odb_source and providing thin wrappers that call those functions.

To set expectations: this is only a start, there is still functionality missing that needs to be made pluggable. Most importantly:

  • Counting of objects.

  • Abbreviating object IDs and finding ambiguous objects.

  • Consistency checks.

  • Generating packfiles.

These will all happen in later patch series. That being said, with this patch series one already gets a lot of the basic functionality, and it's almost possible to do local workflows. Only "almost" though because we rely on abbreviating object IDs in a lot of places, but once that part is implemented in a subsequent patch series you can indeed work with an alternate implementation.

Furthermore, what I didn't include as part of this patch series just yet is the introduction of the "objectStorage" extension. I mostly wanted to focus on the mostly-trivial parts without introducing any change in behaviour.

Thanks!

Patrick

--- b4-submit-tracking ---

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

{ "series": { "revision": 1, "change-id": "20260120-b4-pks-odb-source-pluggable-5c724250b3c8", "prefixes": [] } }

Closes Create a backend that coordinates packfiles and... (#552 - closed).

Edited by Patrick Steinhardt

Merge request reports

Loading