From 888692b733b3109874bb570bb0680e93287ed338 Mon Sep 17 00:00:00 2001 From: Tay Ray Chuan Date: Tue, 2 Mar 2010 18:49:29 +0800 Subject: 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 Signed-off-by: Junio C Hamano --- http-fetch.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'http-fetch.c') diff --git a/http-fetch.c b/http-fetch.c index ffd0ad7e29..762c750d7a 100644 --- a/http-fetch.c +++ b/http-fetch.c @@ -1,5 +1,6 @@ #include "cache.h" #include "exec_cmd.h" +#include "http.h" #include "walker.h" static const char http_fetch_usage[] = "git http-fetch " @@ -69,7 +70,8 @@ int main(int argc, const char **argv) url = rewritten_url; } - walker = get_http_walker(url, NULL); + http_init(NULL); + walker = get_http_walker(url); walker->get_tree = get_tree; walker->get_history = get_history; walker->get_all = get_all; @@ -89,6 +91,7 @@ int main(int argc, const char **argv) } walker_free(walker); + http_cleanup(); free(rewritten_url); -- cgit v1.2.3