From: Clemens Buchacher Date: Sun, 21 Feb 2010 10:57:07 GMT Subject: Re: [PATCH 5/7] http: init and cleanup separately from http-walker Message-ID: <20100221105707.GA22534@localhost> In-Reply-To: <20100221103820.GA5166@localhost> On Sun, Feb 21, 2010 at 11:38:20AM +0100, Clemens Buchacher wrote: > On Sun, Feb 21, 2010 at 11:08:26AM +0800, Tay Ray Chuan wrote: > > diff --git a/http-fetch.c b/http-fetch.c > [...] > > @@ -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; > > You changed the order of get_http_walker and http_init. But Umh, actually you didn't. Sorry about that. > > add_fill_function(walker, (int (*)(void *)) fill_active_slot); > > already deals with curl functionality. So even though I think it technically > doesn't break, I would prefer if this dependency were still expressed in the > code. > > > @@ -88,6 +90,7 @@ int main(int argc, const char **argv) > > "status code. Suggest running 'git fsck'.\n"); > > } > > > > + http_cleanup(); > > walker_free(walker); > > > > free(rewritten_url); > > Same as above. But I think this is still valid. Clemens