From: Karthik Nayak Date: Wed, 20 Aug 2025 13:35:05 GMT Subject: Re: [PATCH 11/16] packfile: always add packfiles to MRU when adding a pack Message-ID: In-Reply-To: <20250819-b4-pks-packfiles-store-v1-11-1660842e125a@pks.im> Patrick Steinhardt writes: > When adding a packfile to it store we add it both to the list and map of > packfiles, but we don't append it to the most-recently-used list of > packs. We do know to add the packfile to the MRU list as soon as we > access any of its objects, but in between we're being inconistent. It > doesn't help that there are some subsystems that _do_ add the packfile > to the MRU after having added it, which only adds to the confusion. > > Refactor the code so that we unconditionally add packfiles to the MRU > when adding them to a packfile store. This makes sense. It would be really nice if the internals of packfile_store is private, that way users wouldn't know/care about the mru in the first place. Till this patch, we seem to be moving in that direction as more things move into `packfile_store` we can slowly abstract it behind a strong set of APIs and internals can be kept private. [snip]