git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Sven Strickroth <email@cs-ware.de>
To: Sven Strickroth <email@cs-ware.de>, git <git@vger.kernel.org>,
	Junio C Hamano <gitster@pobox.com>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: [PATCH] Drop unneeded special handling of ssh variant tortoiseplink
Date: Fri, 22 Oct 2021 18:45:29 +0200	[thread overview]
Message-ID: <82c63c23-446a-1945-0083-f1f5af6d43e8@cs-ware.de> (raw)
In-Reply-To: <dad761bf-3121-8934-fad6-78610bc21121@cs-ware.de>

"-p" is supported and "--batch" is ignored in TortoisePLink from
TortoiseSVN and TortoiseGit since at least March 2015 (and TortoiseCVS
is not maintained any more). Therefore, there is no need any more to
keep these parameters for ancient versions of tortoiseplink.

Signed-off-by: Sven Strickroth <email@cs-ware.de>
---
 Documentation/config/ssh.txt | 2 +-
 connect.c                    | 5 +----
 t/t5601-clone.sh             | 4 ++--
 3 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/Documentation/config/ssh.txt b/Documentation/config/ssh.txt
index 2ca4bf93e1..3902c8371d 100644
--- a/Documentation/config/ssh.txt
+++ b/Documentation/config/ssh.txt
@@ -27,7 +27,7 @@ follows:
 
 * `plink` or `putty` - [-P port] [-4] [-6] [username@]host command
 
-* `tortoiseplink` - [-P port] [-4] [-6] -batch [username@]host command
+* `tortoiseplink` - [-p port] [-4] [-6] [username@]host command
 
 --
 +
diff --git a/connect.c b/connect.c
index eaf7d6d261..2628c2fc17 100644
--- a/connect.c
+++ b/connect.c
@@ -1269,9 +1269,6 @@ static void push_ssh_options(struct strvec *args, struct strvec *env,
 		}
 	}
 
-	if (variant == VARIANT_TORTOISEPLINK)
-		strvec_push(args, "-batch");
-
 	if (port) {
 		switch (variant) {
 		case VARIANT_AUTO:
@@ -1279,11 +1276,11 @@ static void push_ssh_options(struct strvec *args, struct strvec *env,
 		case VARIANT_SIMPLE:
 			die(_("ssh variant 'simple' does not support setting port"));
 		case VARIANT_SSH:
+		case VARIANT_TORTOISEPLINK:
 			strvec_push(args, "-p");
 			break;
 		case VARIANT_PLINK:
 		case VARIANT_PUTTY:
-		case VARIANT_TORTOISEPLINK:
 			strvec_push(args, "-P");
 		}
 
diff --git a/t/t5601-clone.sh b/t/t5601-clone.sh
index 83c24fc97a..41e1670328 100755
--- a/t/t5601-clone.sh
+++ b/t/t5601-clone.sh
@@ -430,7 +430,7 @@ test_expect_success 'plink.exe is treated specially (as putty)' '
 test_expect_success 'tortoiseplink is like putty, with extra arguments' '
 	copy_ssh_wrapper_as "$TRASH_DIRECTORY/tortoiseplink" &&
 	git clone "[myhost:123]:src" ssh-bracket-clone-plink-2 &&
-	expect_ssh "-batch -P 123" myhost src
+	expect_ssh "-p 123" myhost src
 '
 
 test_expect_success 'double quoted plink.exe in GIT_SSH_COMMAND' '
@@ -472,7 +472,7 @@ test_expect_success 'GIT_SSH_VARIANT overrides plink to tortoiseplink' '
 	copy_ssh_wrapper_as "$TRASH_DIRECTORY/plink" &&
 	GIT_SSH_VARIANT=tortoiseplink \
 	git clone "[myhost:123]:src" ssh-bracket-clone-variant-4 &&
-	expect_ssh "-batch -P 123" myhost src
+	expect_ssh "-p 123" myhost src
 '
 
 test_expect_success 'clean failure on broken quoting' '
-- 
2.33.1.windows.1


  reply	other threads:[~2021-10-22 16:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-22 16:13 tortoiseplink ssh variant still needed? Sven Strickroth
2021-10-22 16:45 ` Sven Strickroth [this message]
2021-10-23  9:57   ` [PATCH] Drop unneeded special handling of ssh variant tortoiseplink Ævar Arnfjörð Bjarmason
2021-10-23 21:53 ` tortoiseplink ssh variant still needed? Junio C Hamano
2021-10-25 13:04   ` Johannes Schindelin

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=82c63c23-446a-1945-0083-f1f5af6d43e8@cs-ware.de \
    --to=email@cs-ware.de \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).