]> git.ipfire.org Git - thirdparty/git.git/commit
http: refactor subsystem to use `packfile_list`s
authorPatrick Steinhardt <ps@pks.im>
Thu, 30 Oct 2025 10:38:40 +0000 (11:38 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 30 Oct 2025 14:09:52 +0000 (07:09 -0700)
commit89219bc0cd09ada8a204e0ace0bd15decaea7d31
treec56034339260eb35f5859814598fa975a0e2b540
parentf905a855b1d1e172ba1e51e03fc5ec531445575e
http: refactor subsystem to use `packfile_list`s

The dumb HTTP protocol directly fetches packfiles from the remote server
and temporarily stores them in a list of packfiles. Those packfiles are
not yet added to the repository's packfile store until we finalize the
whole fetch.

Refactor the code to instead use a `struct packfile_list` to store those
packs. This prepares us for a subsequent change where the `->next`
pointer of `struct packed_git` will go away.

Note that this refactoring creates some temporary duplication of code,
as we now have both `packfile_list_find_oid()` and `find_oid_pack()`.
The latter function will be removed in a subsequent commit though.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
http-push.c
http-walker.c
http.c
http.h
packfile.c
packfile.h