X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=http.h;h=e9ed3c2e8272e43208e75459ec29fd8b6548ae4d;hb=2b1e17237b0b14855ad8337ec001d6d1fd7cca61;hp=173f74c8298c3fa3989f88b06e2085127fe96db8;hpb=b91779f17eb19ffc2e63e84728e785cf274b47df;p=git.git diff --git a/http.h b/http.h index 173f74c82..e9ed3c2e8 100644 --- a/http.h +++ b/http.h @@ -8,6 +8,7 @@ #include "strbuf.h" #include "remote.h" +#include "url.h" /* * We detect based on the cURL version if multi-transfer is @@ -41,14 +42,12 @@ #define NO_CURL_IOCTL #endif -struct slot_results -{ +struct slot_results { CURLcode curl_result; long http_code; }; -struct active_request_slot -{ +struct active_request_slot { CURL *curl; FILE *local; int in_use; @@ -61,8 +60,7 @@ struct active_request_slot struct active_request_slot *next; }; -struct buffer -{ +struct buffer { struct strbuf buf; size_t posn; }; @@ -117,7 +115,6 @@ extern void append_remote_object_url(struct strbuf *buf, const char *url, int only_two_digit_prefix); extern char *get_remote_object_url(const char *url, const char *hex, int only_two_digit_prefix); -extern void end_url_with_slash(struct strbuf *buf, const char *url); /* Options for http_request_*() */ #define HTTP_NO_CACHE 1 @@ -149,8 +146,7 @@ extern int http_fetch_ref(const char *base, struct ref *ref); extern int http_get_info_packs(const char *base_url, struct packed_git **packs_head); -struct http_pack_request -{ +struct http_pack_request { char *url; struct packed_git *target; struct packed_git **lst; @@ -166,8 +162,7 @@ extern int finish_http_pack_request(struct http_pack_request *preq); extern void release_http_pack_request(struct http_pack_request *preq); /* Helpers for fetching object */ -struct http_object_request -{ +struct http_object_request { char *url; char tmpfile[PATH_MAX]; int localfile;