Re: [PATCH v2 00/17] odb: introduce "in-memory" source
- From
Karthik Nayak <karthik.188@gmail.com>
- Date
- Apr 9, 2026, 11:44 UTC
- Message-ID
- <CAOLa=ZTOOTqNv7j-DFdC2cMje=5MBdNBkqp9PhgUC7dQFKLz3A@mail.gmail.com>
- In-Reply-To
- <20260409-b4-pks-odb-source-inmemory-v2-0-f02b4f1c0f13@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 29 quoted lines
> Hi, > > this patch series introduces the second object database source type, > which is the "in-memory" source. > > This source may seem somewhat odd at first: it always starts out empty, > and any object written into it will only exist in memory until the > process exits. But the source already serves a purpose in our codebase, > where some commands, for example git-blame(1), write an in-memory > worktree commit. > > Furthermore, I think that going forward it can serve more purposes as we > now have an easy way to write and read objects that will not get > persisted. I could see that this may be useful when for example > re-merging diffs. But eventually, once we have the object storage format > extension wired up, callers might even want to manually set up an > in-memory database as the primary ODB for write operations so that no > data will be persisted in an arbitrary write. > > Last but not least, this patch series also serves the purpose of > eventually getting rid of the `struct object_info::whence` member. > Instead, we'll simply yield the ODB source a specific object has been > read from, together with some backend-specific data, which gives > strictly more information compared to the status quo. > > The series is based onb15384c06f (A bit more post -rc1, 2026-04-08) > with jt/odb-transaction-write at ddf6aee9c6 (odb/transaction: make > `write_object_stream()` pluggable, 2026-04-02) merged into it. >
Was a nice read, only a few comments from me. Should be good with a re-roll!
[snip]