Re: [PATCH v3 02/15] odb: move list of packfiles into `struct packfile_store`
- From
Karthik Nayak <karthik.188@gmail.com>
- Date
- Sep 9, 2025, 08:00 UTC
- Message-ID
- <CAOLa=ZRrBVoGKo+VD25LDBUV2QF1jow62w5Ab3cVmu8S7W+-kw@mail.gmail.com>
- In-Reply-To
- <20250902-b4-pks-packfiles-store-v3-2-6925278efeda@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 9 quoted lines
> @@ -789,8 +784,8 @@ void install_packed_git(struct repository *r, struct packed_git *pack) > if (pack->pack_fd != -1) > pack_open_fds++; > > - pack->next = r->objects->packed_git; > - r->objects->packed_git = pack; > + pack->next = r->objects->packfiles->packs; > + r->objects->packfiles->packs = pack; >
So this is where we insert the packfile into the packfile_store. Okay makes sense.
Show 7 quoted lines
> +/* > + * Close all packfiles associated with this store. The packfiles won't be > + * free'd, so they can be re-opened at a later point in time. > + */ > +void packfile_store_close(struct packfile_store *store); > + >
One immediate question is, how can someone reopen the closed packfiles. Is that something that the packfile store should offer?
Show 6 quoted lines
> static inline int pack_map_entry_cmp(const void *cmp_data UNUSED, > const struct hashmap_entry *entry, > const struct hashmap_entry *entry2, > > -- > 2.51.0.384.g4c02a37b29.dirty