From: Junio C Hamano Date: Tue, 23 May 2006 20:25:55 GMT Subject: Re: [PATCH 2/2] cvsimport: cleanup commit function Message-ID: <7vsln04hf0.fsf@assigned-by-dhcp.cox.net> In-Reply-To: Linus Torvalds writes: >> Committing initial tree 34bd3dcd4bfd79bad35ce3fb08b2e21108195db8 >> Server has gone away while fetching BUGS-TODO 1.1, retrying... >... > Martin, that problem seems to go away when I initialize $res to 0 in > _fetchfile. > > I don't know perl, and maybe local variables are pre-initialized to empty. When a new file that is empty is created, sub _line would call sub _fetchfile with $cnt == 0, and it can return $res which is initialized to 'undef'. That explains why sub file says $self->_line() returned an undef and I think what you did is the right fix.