Skip to content

Commit aa4b83d

Browse files
waterkipgitster
authored andcommitted
git-svn: drop FakeTerm hack
Drop the FakeTerm hack, just like dfd46ba (send-email: drop FakeTerm hack, 2023-08-08) did, for exactly the same reason. It has been obsolete in git-svn since 30d45f7 (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 <[email protected]> Helped-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 0d1bd1d commit aa4b83d

File tree

1 file changed

+2
-18
lines changed

1 file changed

+2
-18
lines changed

git-svn.perl

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -297,28 +297,12 @@ sub _req_svn {
297297
{} ],
298298
);
299299

300-
package FakeTerm;
301-
sub new {
302-
my ($class, $reason) = @_;
303-
return bless \$reason, shift;
304-
}
305-
sub readline {
306-
my $self = shift;
307-
die "Cannot use readline on FakeTerm: $$self";
308-
}
309-
package main;
310-
311300
my $term;
312301
sub term_init {
313-
$term = eval {
314-
require Term::ReadLine;
315-
$ENV{"GIT_SVN_NOTTY"}
302+
require Term::ReadLine;
303+
$term = $ENV{"GIT_SVN_NOTTY"}
316304
? new Term::ReadLine 'git-svn', \*STDIN, \*STDOUT
317305
: new Term::ReadLine 'git-svn';
318-
};
319-
if ($@) {
320-
$term = new FakeTerm "$@: going non-interactive";
321-
}
322306
}
323307

324308
my $cmd;

0 commit comments

Comments
 (0)