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

Re: [BISECTED] git-svn: "Failed to read object ..." during clone

From
Sam Vilain <sam@vilain.net>
Date
May 28, 2008, 07:28 UTC
Message-ID
<483D098D.5010302@vilain.net>
In-Reply-To
<7vskw3vsys.fsf@gitster.siamese.dyndns.org>
Junio C Hamano wrote:
Show 9 quoted lines
> Heh, I should have been more careful.  The series introduces Git::cat_blob
> that returns the size of a blob but the interface is broken and signals
> error by returning zero.  e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 is a
> zero sized blob.
> 
> Would this be enough?
>  		my $size = $::_repository->cat_blob($fb->{blob}, $base);
> -		die "Failed to read object $fb->{blob}" unless $size;
> +		die "Failed to read object $fb->{blob}" if ($size < 0);

Heh. This sort of thing is why perl has "undef"; you could make that "unless defined $size" and "return undef" in the functions.

Sam
Previous: Junio C HamanoNext: Björn Steinbrink
Message 3 of 4 in “[BISECTED] git-svn: "Failed to read object ..." during clone”
  1. Björn SteinbrinkMay 28, 2008
  2. Junio C HamanoMay 28, 2008
  3. Sam VilainMay 28, 2008
  4. Björn SteinbrinkMay 28, 2008

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.