diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-03-15 14:22:09 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-03-15 14:22:09 -0700 |
commit | 936dfc220210bc00c7dc094250c9680620dab291 (patch) | |
tree | 8b4f171464d082d6bb45c07baa2a4e25ec71dc42 | |
parent | 8506588107791336e23157543d243b8118943934 (diff) | |
parent | e7cad3ccd05461b0defdef86c9d786ab6fb9fe40 (diff) | |
download | git-936dfc220210bc00c7dc094250c9680620dab291.tar.gz git-936dfc220210bc00c7dc094250c9680620dab291.tar.xz |
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
-rwxr-xr-x | git-cvsimport.perl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/git-cvsimport.perl b/git-cvsimport.perl index 8e683e547..bbf327f3e 100755 --- a/git-cvsimport.perl +++ b/git-cvsimport.perl @@ -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"; |