From: Justin Tobler Date: Wed, 17 Sep 2025 21:59:04 GMT Subject: Re: [PATCH v5 05/15] odb: move MRU list of packfiles into `struct packfile_store` Message-ID: In-Reply-To: <20250915-b4-pks-packfiles-store-v5-5-d6340350934f@pks.im> On 25/09/15 10:54AM, Patrick Steinhardt wrote: > The object database tracks the list of packfiles in most-recently-used > order, which is mostly used to favor reading from packfiles that contain > most of the objects that we're currently accessing. With the > introduction of the `struct packfile_store` we have a better place to > host this list though. > > Move the list accordingly. > > Signed-off-by: Patrick Steinhardt > --- [snip] > @@ -1035,7 +1034,6 @@ void odb_clear(struct object_database *o) > free((char *) o->cached_objects[i].value.buf); > FREE_AND_NULL(o->cached_objects); > > - INIT_LIST_HEAD(&o->packed_git_mru); Now that the mru list lives in `struct packfile_store`, it cleanup automatically gets handled via packfile_store_free(). Makes sense. > close_object_store(o); > packfile_store_free(o->packfiles); > o->packfiles = NULL; I quite like all of the reorganization in this series so far. :) -Justin