git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 5/7] http: init and cleanup separately from http-walker

From
Clemens Buchacher <drizzd@aon.at>
Date
Feb 21, 2010, 10:57 UTC
Message-ID
<20100221105707.GA22534@localhost>
In-Reply-To
<20100221103820.GA5166@localhost>
On Sun, Feb 21, 2010 at 11:38:20AM +0100, Clemens Buchacher wrote:
Show 15 quoted lines
> 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.
Show 17 quoted lines
> 
>         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
Previous: Clemens BuchacherNext: Tay Ray Chuan
Message 10 of 13 in “http: minor improvements”
  1. 0/7 http: minor improvementsTay Ray Chuan, Feb 21, 2010
  2. 1/7 t5541-http-push: check that ref is unchanged for non-ff testTay Ray Chuan, Feb 21, 2010
  3. 2/7 t554[01]-http-push: refactor, add non-ff testsTay Ray Chuan, Feb 21, 2010
  4. 3/7 http-push: remove useless conditionTay Ray Chuan, Feb 21, 2010
  5. Clemens BuchacherFeb 21, 2010
  6. Tay Ray ChuanFeb 21, 2010
  7. 4/7 http-walker: cleanup more thoroughlyTay Ray Chuan, Feb 21, 2010
  8. 5/7 http: init and cleanup separately from http-walkerTay Ray Chuan, Feb 21, 2010
  9. Clemens BuchacherFeb 21, 2010
  10. Clemens BuchacherFeb 21, 2010
  11. Tay Ray ChuanFeb 21, 2010
  12. 6/7 remote-curl: use http_fetch_ref() instead of walker wrapperTay Ray Chuan, Feb 21, 2010
  13. 7/7 remote-curl: init walker only when neededTay Ray Chuan, Feb 21, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.