From: Junio C Hamano Date: Thu, 29 Sep 2005 09:14:28 GMT Subject: Re: [PATCH] fetch-pack should not ask for a ref which is already there Message-ID: <7vhdc4grrf.fsf@assigned-by-dhcp.cox.net> In-Reply-To: Johannes Schindelin 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.