Re: [PATCH 05/13] object-file: introduce `struct odb_loose_source`
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Oct 31, 2025, 06:11 UTC
- Message-ID
- <aQRS-KcNLD9prRYa@pks.im>
- In-Reply-To
- <aQNMwve9sUP-QDN6@pks.im>
On Thu, Oct 30, 2025 at 12:32:21PM +0100, Patrick Steinhardt wrote:
Show 22 quoted lines
> On Thu, Oct 30, 2025 at 03:47:58AM -0700, Karthik Nayak wrote: > > Patrick Steinhardt <ps@pks.im> writes: > > > > > Currently, all state that relates to loose objects is held directly by > > > the `struct odb_source`. Introduce a new `struct odb_loose_source` to > > > hold the state instead so that it is entirely self-contained. > > > > > > > I wonder if the naming should instead be `struct obd_source_loose` that > > way other backends (if added) would be something like: > > > > struct obd_source_loose > > struct obd_source_postgres > > struct obd_source_mongo > > > > This is easier to read and also for autocompletion it leads nicely into > > the 'obd_source_...' namespace. > > Hm, I see your point. I think that "loose source" flows a bit more > natural, but I agree that the above is more accessible in code. > > Before I change this: does anybody else have an opinion here?
I think for now I'll stick to the current naming. This is due to two reasons:
- As said, I think this flows more naturally in language. When talking
about this you'll say "I'm using the files source" or "I'm using the
whatever source". - It somewhat matches the naming we have in the reference backends,
where we have `struct reftable_backend` and `struct files_backend`.That being said I don't feel very strong about this. So I'll post v2 with the current naming, but if either you or somebody else feels strongly that this should be adjusted I'm happy to adapt.
Thanks!
Patrick