X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=http.h;h=5de792ef3fe1dd8597c9b890a120eeacd2eb4994;hb=0a23331aa6bac1447d7983111d9c3efbea970cb3;hp=faf8cbb0d10e44e036542a15aa6684a5eb7416cc;hpb=fdeb74f3720e7efdc2d64941ce5853d87e0371ad;p=thirdparty%2Fgit.git diff --git a/http.h b/http.h index faf8cbb0d1..5de792ef3f 100644 --- a/http.h +++ b/http.h @@ -216,18 +216,36 @@ int http_get_info_packs(const char *base_url, struct http_pack_request { char *url; - struct packed_git *target; - struct packed_git **lst; + + /* + * If this is true, finish_http_pack_request() will pass "--keep" to + * index-pack, resulting in the creation of a keep file, and will not + * suppress its stdout (that is, the "keep\t\n" line will be + * printed to stdout). + */ + unsigned generate_keep : 1; + FILE *packfile; struct strbuf tmpfile; struct active_request_slot *slot; }; struct http_pack_request *new_http_pack_request( - struct packed_git *target, const char *base_url); + const unsigned char *packed_git_hash, const char *base_url); +struct http_pack_request *new_direct_http_pack_request( + const unsigned char *packed_git_hash, char *url); int finish_http_pack_request(struct http_pack_request *preq); void release_http_pack_request(struct http_pack_request *preq); +/* + * Remove p from the given list, and invoke install_packed_git() on it. + * + * This is a convenience function for users that have obtained a list of packs + * from http_get_info_packs() and have chosen a specific pack to fetch. + */ +void http_install_packfile(struct packed_git *p, + struct packed_git **list_to_remove_from); + /* Helpers for fetching object */ struct http_object_request { char *url;