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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano wrote:
> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux