mirror of
https://github.com/git/git.git
synced 2024-11-24 10:26:17 +08:00
Merge branch 'ws/git-svn-retire-faketerm'
Code clean-up. * ws/git-svn-retire-faketerm: git-svn: drop FakeTerm hack
This commit is contained in:
commit
300b2a1047
18
git-svn.perl
18
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"}
|
||||
$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;
|
||||
|
Loading…
Reference in New Issue
Block a user