summaryrefslogtreecommitdiff
path: root/git-cvsimport.perl
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-05-23 23:30:39 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-05-23 23:30:39 (GMT)
commit61efa5e300386978dd440716260c94e951a493b4 (patch)
treed0a8e6734f4bb25879029c97b70824ba89d342df /git-cvsimport.perl
parent405053d2d98c613d028795df439de657981e0711 (diff)
downloadgit-61efa5e300386978dd440716260c94e951a493b4.zip
git-61efa5e300386978dd440716260c94e951a493b4.tar.gz
git-61efa5e300386978dd440716260c94e951a493b4.tar.bz2
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>
Diffstat (limited to 'git-cvsimport.perl')
-rwxr-xr-xgit-cvsimport.perl2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index 41ee9a6..60fc86a 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) {