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

Re: fetch_refs_via_pack() discards status?

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 5, 2007, 21:06 UTC
Message-ID
<7vwsrsonqm.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<Pine.LNX.4.64.0712051356040.5349@iabervon.org>
Daniel Barkalow <barkalow@iabervon.org> writes:
Show 17 quoted lines
> On Tue, 4 Dec 2007, Junio C Hamano wrote:
>
>> 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
Hmph, is that an Ack that the patchlet is actually a bugfix?
Previous: Daniel BarkalowNext: André Goddard Rosa
Message 8 of 10 in “Fix segmentation fault when user doesn't have access permission to the repository.”
  1. Fix segmentation fault when user doesn't have access permission to the repository.André Goddard Rosa, Nov 22, 2007
  2. Alex RiesenNov 22, 2007
  3. André Goddard RosaNov 22, 2007
  4. Fix segmentation fault when user doesn't have access permission to the repository.André Goddard Rosa, Nov 25, 2007
  5. Junio C HamanoNov 30, 2007
  6. fetch_refs_via_pack() discards status?Junio C Hamano, Dec 5, 2007
  7. Daniel BarkalowDec 5, 2007
  8. Junio C HamanoDec 5, 2007
  9. André Goddard RosaDec 6, 2007
  10. Daniel BarkalowDec 6, 2007

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.