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.0-rc1~84 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=61efa5e300386978dd440716260c94e951a493b4;p=git.git 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 --- diff --git a/git-cvsimport.perl b/git-cvsimport.perl index 41ee9a608..60fc86a5b 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) {