http: init and cleanup separately from http-walker
Previously, all our http operations were done with http-walker. With the new remote-curl helper, we find ourselves using http methods outside of http-walker - for example, fetching info/refs. Accomodate this by separating http_init() and http_cleanup() invocations from http-walker. Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
09ae9aca14
commit
888692b733
@ -559,18 +559,14 @@ static void cleanup(struct walker *walker)
|
||||
free(data);
|
||||
walker->data = NULL;
|
||||
}
|
||||
|
||||
http_cleanup();
|
||||
}
|
||||
|
||||
struct walker *get_http_walker(const char *url, struct remote *remote)
|
||||
struct walker *get_http_walker(const char *url)
|
||||
{
|
||||
char *s;
|
||||
struct walker_data *data = xmalloc(sizeof(struct walker_data));
|
||||
struct walker *walker = xmalloc(sizeof(struct walker));
|
||||
|
||||
http_init(remote);
|
||||
|
||||
data->alt = xmalloc(sizeof(*data->alt));
|
||||
data->alt->base = xmalloc(strlen(url) + 1);
|
||||
strcpy(data->alt->base, url);
|
||||
|
Reference in New Issue
Block a user