@matheusbsbs / matheus-bagliano / commits / 61efa5e300
Fork 0

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 <junkio@cox.net>

Junio C Hamano committed May 23, 2006 at 16:30 UTC 61efa5e300386978dd440716260c94e951a493b4
1 file changed +1 -1
git-cvsimport.perl
+1 -1
@@ -371,7 +371,7 @@ sub file {
371 }
372 sub _fetchfile {
373 my ($self, $fh, $cnt) = @_;
374 - my $res;
374 + my $res = 0;
375 my $bufsize = 1024 * 1024;
376 while($cnt) {
377 if ($bufsize > $cnt) {