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

Re: [PATCH] fetch-pack should not ask for a ref which is already there

From
Junio C Hamano <junkio@cox.net>
Date
Sep 29, 2005, 09:14 UTC
Message-ID
<7vhdc4grrf.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.63.0509291034450.20717@wgmdd8.biozentrum.uni-wuerzburg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> Yeah, sorry. I did not test that one. Maybe an automated test for 
> git-fetch-pack would be useful after all...
Sounds sensible.  I think git-send-pack has one.
> How about the following? (I avoided an ugly goto, but had to duplicate 
> code :-( )

I suspect it would be cleaner to return (struct ref *) from fetch_pack (ideally use NULL to signal failure but there is no need -- it just dies) and print the refs from main() only after seeing the last close and finish_connect succeed.

Previous: Johannes SchindelinNext: Johannes Schindelin
Message 4 of 10 in “fetch-pack should not ask for a ref which is already there”
  1. fetch-pack should not ask for a ref which is already thereJohannes Schindelin, Sep 28, 2005
  2. Junio C HamanoSep 29, 2005
  3. Johannes SchindelinSep 29, 2005
  4. Junio C HamanoSep 29, 2005
  5. Johannes SchindelinSep 29, 2005
  6. Linus TorvaldsSep 29, 2005
  7. Johannes SchindelinSep 29, 2005
  8. Johannes SchindelinSep 29, 2005
  9. Linus TorvaldsSep 29, 2005
  10. Johannes SchindelinSep 30, 2005

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.