Re: [PATCH v2 3/4] odb: prepare `struct odb_transaction` to become generic
- From
Justin Tobler <jltobler@gmail.com>
- Date
- Feb 4, 2026, 17:15 UTC
- Message-ID
- <aYN9p7crUDUlog8p@denethor>
- In-Reply-To
- <aYLmel06ANrskuG5@pks.im>
On 26/02/04 07:26AM, Patrick Steinhardt wrote:
Show 14 quoted lines
> On Tue, Feb 03, 2026 at 02:54:08PM -0800, Junio C Hamano wrote: > > Justin Tobler <jltobler@gmail.com> writes: > > > > > So long as `struct odb_transaction` remains the first member of `struct > > > odb_transaction_files`, using `container_of()` is functionally the same > > > thing as casting. This is also how we do things for `odb_read_stream` > > > and `odb_loose_read_stream` so I don't think it is too big of a deal > > > either way. > > > > It would be a good theme to clean them all up, together with > > existing ones, in a separate topic. Code hygiene matters. > > Fair indeed. Justin, will you handle this cleanup once this topic here > is merged or shall I do it?
I've already have a patch that addresses `odb_transaction_files` and `odb_loose_read_stream`. I'll check to see if there are any others I notice and send a followup series after this one gets merged.
-Justin