From: Junio C Hamano <gitster@pobox.com>
To: Wesley <wesleys@opperschaap.net>, Jeff King <peff@peff.net>
Cc: git@vger.kernel.org
Subject: [PATCH] git-svn: drop FakeTerm hack
Date: Wed, 30 Aug 2023 15:32:08 -0700 [thread overview]
Message-ID: <xmqqa5u888lz.fsf_-_@gitster.g> (raw)
In-Reply-To: <xmqqjzu1o97n.fsf@gitster.g> (Junio C. Hamano's message of "Fri, 11 Aug 2023 09:05:48 -0700")
Junio C Hamano <gitster@pobox.com> writes:
> Jeff King <peff@peff.net> writes:
> ...
>> It could still benefit from cleaning up FakeTerm, since we lazily init
>> the object since 30d45f798d (git-svn: delay term initialization,
>> 2014-09-14). But I don't think there's a visible bug here with the new
>> version of Term::ReadLine::Gnu.
>
> True. Let me drop the patch from the 'next down to master
> fast-track' candidate status.
We did the above but then everybody seems to have forgotten about
it. Let's resurrect the topic. Here is my attempt.
---- >8 ----
From: Wesley Schwengle <wesleys@opperschaap.net>
Subject: [PATCH] git-svn: drop FakeTerm hack
Drop the FakeTerm hack, just like dfd46bae (send-email: drop
FakeTerm hack, 2023-08-08) did, for exactly the same reason.
Signed-off-by: Wesley Schwengle <wesleys@opperschaap.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
git-svn.perl | 20 ++------------------
1 file changed, 2 insertions(+), 18 deletions(-)
diff --git c/git-svn.perl w/git-svn.perl
index be987e316f..4e8878f035 100755
--- c/git-svn.perl
+++ w/git-svn.perl
@@ -297,28 +297,12 @@ sub _req_svn {
{} ],
);
-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;
next prev parent reply other threads:[~2023-08-30 22:32 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-10 0:39 [PATCH] Fix bug when more than one readline instance is used Wesley Schwengle
2023-08-10 0:49 ` Jeff King
2023-08-10 1:18 ` [[PATCH v2]] " Wesley Schwengle
2023-08-10 14:31 ` Junio C Hamano
2023-08-10 15:14 ` Wesley
2023-08-11 1:01 ` Junio C Hamano
2023-08-11 1:09 ` Wesley
2023-08-11 5:30 ` Junio C Hamano
2023-08-11 14:51 ` Jeff King
2023-08-11 16:05 ` Junio C Hamano
2023-08-30 22:32 ` Junio C Hamano [this message]
2023-08-31 0:13 ` [PATCH] git-svn: drop FakeTerm hack Jeff King
2023-08-31 0:28 ` Junio C Hamano
2023-08-10 1:05 ` [PATCH] Fix bug when more than one readline instance is used Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqa5u888lz.fsf_-_@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
--cc=wesleys@opperschaap.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).