]> git.ipfire.org Git - thirdparty/git.git/commitdiff
git-svn: drop FakeTerm hack
authorWesley Schwengle <wesleys@opperschaap.net>
Wed, 30 Aug 2023 22:32:08 +0000 (15:32 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 31 Aug 2023 00:20:31 +0000 (17:20 -0700)
Drop the FakeTerm hack, just like dfd46bae (send-email: drop
FakeTerm hack, 2023-08-08) did, for exactly the same reason.

It has been obsolete in git-svn since 30d45f798d (git-svn: delay term
initialization, 2014-09-14). Note that unlike send-email, we already
make sure to load Term::ReadLine only once. So this is just a cleanup,
and not fixing any bug.

Signed-off-by: Wesley Schwengle <wesleys@opperschaap.net>
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
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;