Re: [PATCH 00/16] odb: introduce "inmemory" source
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Apr 8, 2026, 08:22 UTC
- Message-ID
- <adYQPmnajLmVr-vh@pks.im>
- In-Reply-To
- <xmqqa4vknjab.fsf@gitster.g>
On Fri, Apr 03, 2026 at 08:41:16AM -0700, Junio C Hamano wrote:
Show 6 quoted lines
> Patrick Steinhardt <ps@pks.im> writes: > > > this patch series introduces the second object database source type, > > which is the "inmemory" source. > > I cannot read the word without a hyphen, i.e.e.g., "in-memory".
Fair. I think I'll keep it as `odb_source_inmemory` in the sources, which I find easier ot parse than `odb_source_in_memory`, but will adapt to "in-memory" in prose. I already did this for most of the part, but not in the cover letter indeed.
Show 17 quoted lines
> > 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. > > Intermediate tree and blob objects you need while making an octopus > merge may also benefit from this feature, to stay only in-core > without having to get written out to the outside world. > > I understand that this is not meant to be used as a "we create them > only for ourselves and they are available only to us while we work, > but once we are satisfied we make them available to others", which > is much better done by creating an on-disk ephemeral object store, > write such objects in them, and then decide at the end of the > process between discarding the ephemeral store and moving objects > from there to the main object store.
Yeah, I think there's a bunch of use cases where this could be useful going forward.
Patrick