diff --git a/git-svn.perl b/git-svn.perl index be987e316f..4e8878f035 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -297,28 +297,12 @@ my %cmd = ( {} ], ); -package FakeTerm; -sub new { - my ($class, $reason) = @_; - return bless \$reason, shift; -} -sub readline { - my $self = shift; - die "Cannot use readline on FakeTerm: $$self"; -} -package main; - my $term; sub term_init { - $term = eval { - require Term::ReadLine; - $ENV{"GIT_SVN_NOTTY"} + require Term::ReadLine; + $term = $ENV{"GIT_SVN_NOTTY"} ? new Term::ReadLine 'git-svn', \*STDIN, \*STDOUT : new Term::ReadLine 'git-svn'; - }; - if ($@) { - $term = new FakeTerm "$@: going non-interactive"; - } } my $cmd;