diff options
author | Tay Ray Chuan <rctay89@gmail.com> | 2009-06-06 16:44:01 +0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-06-06 11:03:11 -0700 |
commit | 2264dfa5c4f11e2b0e2740072208186bee361afd (patch) | |
tree | 40022b4b80e2af8b0659e85b821a2208847c7670 /contrib/hooks/setgitperms.perl | |
parent | http: use new http API in fetch_index() (diff) | |
download | tgif-2264dfa5c4f11e2b0e2740072208186bee361afd.tar.xz |
http*: add helper methods for fetching packs
The code handling the fetching of packs in http-push.c and
http-walker.c have been refactored into new methods and a new struct
(http_pack_request) in http.c. They are not meant to be invoked
elsewhere.
The new methods in http.c are
- new_http_pack_request
- finish_http_pack_request
- release_http_pack_request
and the new struct is http_pack_request.
Add a function, new_http_pack_request(), that deals with the details of
coming up with the filename to store the retrieved packfile, resuming a
previously aborted request, and making a new curl request. Update
http-push.c::start_fetch_packed() and http-walker.c::fetch_pack() to
use this.
Add a function, finish_http_pack_request(), that deals with renaming
the pack, advancing the pack list, and installing the pack. Update
http-push.c::finish_request() and http-walker.c::fetch_pack to use
this.
Update release_request() in http-push.c and http-walker.c to invoke
release_http_pack_request() to clean up pack request helper data.
The local_stream member of the transfer_request struct in http-push.c
has been removed, as the packfile pointer will be managed in the struct
http_pack_request.
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/hooks/setgitperms.perl')
0 files changed, 0 insertions, 0 deletions