]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'ws/git-svn-retire-faketerm'
authorJunio C Hamano <gitster@pobox.com>
Thu, 7 Sep 2023 22:06:07 +0000 (15:06 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 7 Sep 2023 22:06:08 +0000 (15:06 -0700)
Code clean-up.

* ws/git-svn-retire-faketerm:
  git-svn: drop FakeTerm hack

git-svn.perl

index be987e316f92acda1ff83c880ead3c6848db487c..4e8878f0357ce0d98ae0675b0cabf5c6efb098b2 100755 (executable)
@@ -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;