From: Patrick Steinhardt Date: Tue, 13 May 2025 09:48:44 GMT Subject: Re: [PATCH 3/3] raw_object_store: drop extra pointer to replace_map Message-ID: In-Reply-To: <20250512185233.GC1276214@coredump.intra.peff.net> On Mon, May 12, 2025 at 02:52:33PM -0400, Jeff King wrote: > We store the replacement data in an oidmap, which is itself a pointer in > the raw_object_store struct. But there's no need for an extra pointer > indirection here. It is always allocated and initialized along with the > containing struct, and we never check it for NULL-ness. > > Let's embed the map directly in the struct, which is simpler and avoids > extra pointer chasing. > > Signed-off-by: Jeff King > --- > This one may be more subjective, but IMHO it's good to avoid extra > pointers when we can. Yup, I agree it is a sensible step. There is no good reason why the map should be allocated, so let's just not. All of these cleanups in this series look good to me. Thanks! Patrick