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.