From: Junio C Hamano Date: Tue, 23 May 2006 23:30:39 +0000 (-0700) Subject: cvsimport: do not barf on creation of an empty file. X-Git-Tag: v1.4.1-rc1~65^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/61efa5e300386978dd440716260c94e951a493b4?ds=inline;hp=--cc cvsimport: do not barf on creation of an empty file. When the server says "created this file whose length is empty", we mistakenly said "oops, the server did not say a sensible thing". Fix it. Spotted and fixed by Linus, acked by Martin. Signed-off-by: Junio C Hamano --- 61efa5e300386978dd440716260c94e951a493b4 diff --git a/git-cvsimport.perl b/git-cvsimport.perl index 41ee9a608d..60fc86a5be 100755 --- a/git-cvsimport.perl +++ b/git-cvsimport.perl @@ -371,7 +371,7 @@ sub file { } sub _fetchfile { my ($self, $fh, $cnt) = @_; - my $res; + my $res = 0; my $bufsize = 1024 * 1024; while($cnt) { if ($bufsize > $cnt) {