Re: [PATCH 07/11] Resumable clone: add resumable download to http/curl

2016-09-27 Thread Kevin Wern
On Fri, Sep 16, 2016 at 03:45:44PM -0700, Junio C Hamano wrote: > > @@ -1136,7 +1138,10 @@ static int handle_curl_result(struct slot_results > > *results) > > curl_easy_strerror(results->curl_result), > > sizeof(curl_errorstr)); > > #endif >

Re: [PATCH 07/11] Resumable clone: add resumable download to http/curl

2016-09-16 Thread Junio C Hamano
Kevin Wern writes: > +int http_download_primer(const char *url, const char *out_file) > +{ > + int ret = 0, try_count = HTTP_TRY_COUNT; > + struct http_get_options options = {0}; > + options.progress = 1; > + > + if (file_exists(out_file)) { > + fprintf(stderr, > +

[PATCH 07/11] Resumable clone: add resumable download to http/curl

2016-09-15 Thread Kevin Wern
Create resumable download procedure and progress display function. The conversion from B to KB occurs because otherwise the byte counts for large repos (i.e. Linux) overflow calculating percentage. The download protocol includes the resource's URL, and the directory the resource will be downloaded