[PATCH 0/6] odb: introduce generic object counting
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Mar 10, 2026, 15:18 UTC
- Message-ID
- <20260310-b4-pks-odb-source-count-objects-v1-0-109e07d425f4@pks.im>
Hi,
this small patch series introduces generic object counting for pluggable object databases. The series is built on top of d181b9354c (The 13th batch, 2026-03-09) with ps/odb-sources at d6fc6fe6f8 (odb/source: make `begin_transaction()` function pluggable, 2026-03-05) merged into it.
Thanks!
Patrick
---
Patrick Steinhardt (6):
odb: stop including "odb/source.h"
packfile: extract logic to count number of objects
object-file: extract logic to approximate object count
object-file: generalize counting objects
odb/source: introduce generic object counting
odb: introduce generic object countingbuiltin/gc.c | 44 +++++++++---------------- builtin/multi-pack-index.c | 1 + builtin/submodule--helper.c | 1 + commit-graph.c | 3 +- object-file.c | 57 ++++++++++++++++++++++++++++++++ object-file.h | 14 ++++++++ object-name.c | 6 +++- odb.c | 37 ++++++++++++++++++++- odb.h | 76 +++++++++++++++++++++++++++++++++++++++++-- odb/source-files.c | 30 +++++++++++++++++ odb/source.h | 79 ++++++++++++++++----------------------------- odb/streaming.c | 1 + packfile.c | 48 +++++++++++++-------------- packfile.h | 16 +++++---- repository.c | 1 + submodule-config.c | 1 + tmp-objdir.c | 1 + 17 files changed, 299 insertions(+), 117 deletions(-)
--- base-commit: 2247f478a898a7f8f8322cc51bdeb1cc773d8f4a change-id: 20260224-b4-pks-odb-source-count-objects-479fe682cf6f