From: Karthik Nayak Date: Thu, 09 Apr 2026 11:44:17 GMT Subject: Re: [PATCH v2 00/17] odb: introduce "in-memory" source Message-ID: In-Reply-To: <20260409-b4-pks-odb-source-inmemory-v2-0-f02b4f1c0f13@pks.im> Patrick Steinhardt writes: > 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]