diff options
author | Derrick Stolee <derrickstolee@github.com> | 2022-05-16 20:11:02 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-05-16 22:02:09 (GMT) |
commit | c1d024b84378d099f6ff9bb74e442d17587f3081 (patch) | |
tree | d4ddbfd69731223b08155f1d7d7cf2077c2edad3 /http.h | |
parent | 1f6cf4508ed554b473bb1e5cf89df18f617fe2a2 (diff) | |
download | git-c1d024b84378d099f6ff9bb74e442d17587f3081.zip git-c1d024b84378d099f6ff9bb74e442d17587f3081.tar.gz git-c1d024b84378d099f6ff9bb74e442d17587f3081.tar.bz2 |
http: make http_get_file() external
This method will be used in an upcoming extension of git-remote-curl to
download a single file over HTTP(S) by request.
Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'http.h')
-rw-r--r-- | http.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -163,6 +163,15 @@ struct http_get_options { */ int http_get_strbuf(const char *url, struct strbuf *result, struct http_get_options *options); +/* + * Downloads a URL and stores the result in the given file. + * + * If a previous interrupted download is detected (i.e. a previous temporary + * file is still around) the download is resumed. + */ +int http_get_file(const char *url, const char *filename, + struct http_get_options *options); + int http_fetch_ref(const char *base, struct ref *ref); /* Helpers for fetching packs */ |