Files
git-mirror/builtin
Patrick Steinhardt f905a855b1 packfile: move the MRU list into the packfile store
Packfiles have two lists associated to them:

  - A list that keeps track of packfiles in the order that they were
    added to a packfile store.

  - A list that keeps track of packfiles in most-recently-used order so
    that packfiles that are more likely to contain a specific object are
    ordered towards the front.

Both of these lists are hosted by `struct packed_git` itself, So to
identify all packfiles in a repository you simply need to grab the first
packfile and then iterate the `->next` pointers or the MRU list. This
pattern has the problem that all packfiles are part of the same list,
regardless of whether or not they belong to the same object source.

With the upcoming pluggable object database effort this needs to change:
packfiles should be contained by a single object source, and reading an
object from any such packfile should use that source to look up the
object. Consequently, we need to break up the global lists of packfiles
into per-object-source lists.

A first step towards this goal is to move those lists out of `struct
packed_git` and into the packfile store. While the packfile store is
currently sitting on the `struct object_database` level, the intent is
to push it down one level into the `struct odb_source` in a subsequent
patch series.

Introduce a new `struct packfile_list` that is used to manage lists of
packfiles and use it to store the list of most-recently-used packfiles
in `struct packfile_store`. For now, the new list type is only used in a
single spot, but we'll expand its usage in subsequent patches.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-30 07:09:52 -07:00
..
2025-10-02 12:26:11 -07:00
2025-08-21 13:46:59 -07:00
2024-12-13 07:33:36 -08:00
2025-07-23 08:15:18 -07:00
2025-09-29 11:40:35 -07:00
2025-07-23 08:15:18 -07:00
2025-07-23 08:15:18 -07:00
2025-07-23 08:15:18 -07:00
2025-07-23 08:15:18 -07:00
2025-07-01 14:46:38 -07:00
2025-08-22 13:13:20 -07:00
2025-09-10 14:29:49 -07:00
2024-12-18 10:44:31 -08:00
2025-08-21 13:47:00 -07:00
2025-07-16 22:16:15 -07:00
2025-07-23 08:15:18 -07:00
2025-07-23 08:15:18 -07:00
2025-08-21 13:47:00 -07:00
2025-10-02 12:26:12 -07:00
2025-08-21 13:46:58 -07:00
2025-09-04 11:36:40 -07:00
2025-07-23 08:15:18 -07:00
2025-08-04 08:10:33 -07:00
2025-07-23 08:15:18 -07:00
2025-09-29 11:40:35 -07:00
2025-07-23 08:15:18 -07:00
2025-09-16 11:37:06 -07:00
2024-12-18 10:44:30 -08:00
2025-08-21 13:46:59 -07:00