aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-04-01 16:20:24 -0700
committerJunio C Hamano <gitster@pobox.com>2011-04-01 16:20:24 -0700
commitf35bb7c38d546a9e8360cde53c03b0b881ab4475 (patch)
tree95411dba99eb6aefcac207aa9ec23b96a24e3ccd
parent4584c94f0efb9c03b8e860622937d754076da3dc (diff)
parente7cad3ccd05461b0defdef86c9d786ab6fb9fe40 (diff)
downloadgit-f35bb7c38d546a9e8360cde53c03b0b881ab4475.tar.gz
git-f35bb7c38d546a9e8360cde53c03b0b881ab4475.tar.xz
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
-rwxr-xr-xgit-cvsimport.perl4
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";