Re: fetch_refs_via_pack() discards status?
- From
Daniel Barkalow <barkalow@iabervon.org>
- Date
- Dec 5, 2007, 19:16 UTC
- Message-ID
- <Pine.LNX.4.64.0712051356040.5349@iabervon.org>
- In-Reply-To
- <7vk5nt1v7k.fsf@gitster.siamese.dyndns.org>
On Tue, 4 Dec 2007, Junio C Hamano wrote:
Show 8 quoted lines
> The code calls fetch_pack() to get the list of refs it fetched, and > discards refs and always returns 0 to signal success. > > But builtin-fetch-pack.c::fetch_pack() has error cases. The function > returns NULL if error is detected (shallow-support side seems to choose > to die but I suspect that is easily fixable to error out as well). > > Shouldn't fetch_refs_via_pack() propagate that error to the caller?
I think that's right. I think I got as far as having the error status from fetch_pack() actually returned correctly, and then failed to look at it. I'd personally avoid testing a pointer to freed memory, but that's obviously not actually wrong.
-Daniel *This .sig left intentionally blank*