Commits

Anonymous committed f35bb7c Merge

Merge branch 'fk/maint-cvsimport-early-failure' into maint

* fk/maint-cvsimport-early-failure:
git-cvsimport.perl: Bail out right away when reading from the server fails

Comments (0)

Files changed (1)

git-cvsimport.perl

 	$self->{'socketo'}->write("valid-requests\n");
 	$self->{'socketo'}->flush();
 
-	chomp(my $rep=$self->readline());
+	my $rep=$self->readline();
+	die "Failed to read from server" unless defined $rep;
+	chomp($rep);
 	if ($rep !~ s/^Valid-requests\s*//) {
 		$rep="<unknown>" unless $rep;
 		die "Expected Valid-requests from server, but got: $rep\n";