Skip to content

Commit 936dfc2

Browse files
committed
Merge branch 'fk/maint-cvsimport-early-failure'
* fk/maint-cvsimport-early-failure: git-cvsimport.perl: Bail out right away when reading from the server fails
2 parents 8506588 + e7cad3c commit 936dfc2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

git-cvsimport.perl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,9 @@ sub conn {
366366
$self->{'socketo'}->write("valid-requests\n");
367367
$self->{'socketo'}->flush();
368368

369-
chomp(my $rep=$self->readline());
369+
my $rep=$self->readline();
370+
die "Failed to read from server" unless defined $rep;
371+
chomp($rep);
370372
if ($rep !~ s/^Valid-requests\s*//) {
371373
$rep="<unknown>" unless $rep;
372374
die "Expected Valid-requests from server, but got: $rep\n";

0 commit comments

Comments
 (0)