On Fri, Mar 20, 2026 at 03:04:02AM -0700, Karthik Nayak wrote:
Show 43 quoted lines
> Patrick Steinhardt <ps@pks.im> writes:
>
> > Hi,
> >
> > this patch series refactors handling of object names to become pluggable
> > and thus generic. This includes:
> >
> > - Disambiguation of object names with a common prefix. This is
> > required to list candidate objects in case the user has passed a
> > non-unique prefix.
> >
> > - Abbreviating an object ID to the shortest prefix required while
> > staying unique.
> >
> > The logic to compute these operations is specific to the backend, but
> > not generic. This patch series fixes that by moving the functionality
> > into the respective backends.
> >
> > This patch series may feel somewhat unexiting, but it's not. Especially
> > abbreviating object IDs is done in lots of places, so this functionality
> > is overall quite critical. So starting with this series, it is now
> > possible to do all kinds of local work with an alternative backend:
> > git-commit(1), git-log(1), git-rev-parse(1), git-merge(1) and many other
> > commands now work as expected. My MongoDB proof of concept [1] only
> > requires two commits (the object format extension) on top. And no, I
> > don't endorse MongoDB or propose it as a future potential backend. It
> > simply had a good C API that was easy to use.
> >
> > Of course, other functionality, especially everything that involves
> > packfiles, doesn't yet work.
> >
> > This patch series is built on top of ca1db8a0f7 (The 17th batch,
> > 2026-03-16) with ps/object-counting at 6801ffd37d (odb: introduce
> > generic object counting, 2026-03-12) merged into it.
> >
> > Changes in v2:
> > - Document `cb_iter` callback.
> > - Fix left-over conversion of `odb_source_loose_for_each_object()`.
> > - commit message typo fixes.
> > - Link to v1: https://lore.kernel.org/r/20260319-b4-pks-odb-source-abbrev-v1-0-5ddebad292b0@pks.im
>
> I only got around to reviewing v1 now, but the range-diff here looks
> good.