Skip to content

Commit

Permalink
Merge branch 'fk/maint-cvsimport-early-failure' into maint
Browse files Browse the repository at this point in the history
* fk/maint-cvsimport-early-failure:
  git-cvsimport.perl: Bail out right away when reading from the server fails
  • Loading branch information
Junio C Hamano committed Apr 1, 2011
2 parents 4584c94 + e7cad3c commit f35bb7c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion git-cvsimport.perl
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,9 @@ sub conn {
$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";
Expand Down

0 comments on commit f35bb7c

Please sign in to comment.