git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* tortoiseplink ssh variant still needed?
@ 2021-10-22 16:13 Sven Strickroth
  2021-10-22 16:45 ` [PATCH] Drop unneeded special handling of ssh variant tortoiseplink Sven Strickroth
  2021-10-23 21:53 ` tortoiseplink ssh variant still needed? Junio C Hamano
  0 siblings, 2 replies; 5+ messages in thread
From: Sven Strickroth @ 2021-10-22 16:13 UTC (permalink / raw)
  To: git, Junio C Hamano, Johannes Schindelin

Hi,

Git differentiates between different variants of SSH tools.

One variant is the tortoiseplink variant. When this is configured Git 
passes passes a special "--batch" parameter and passes the port using 
"-P" (capitalized P) t the SSH tool.

IIRC tortoiseplink was initially created by TortoiseCVS which is 
nowadays not maintained any more 
(<http://www.tortoisecvs.org/download.shtml>).
In TortoiseSVN and TortoiseGit tortoiseplink was modified six years ago 
(around 2015-03-07) to ignore the "--batch" parameter and also accept 
"-p" additionally to "-P"  (cf. 
<https://osdn.net/projects/tortoisesvn/scm/svn/commits/26348>).

Therefore, my first question: Does Git still want to support very old 
versions of tortoiseplink or should I provide a patch which drops 
support for it?

Second question:
TortoiseGit comes with an even more improved version of TortoisePLink 
(named TortoiseGitPLink, but also ships the same binary as 
tortoiseplink) that also accepts "-o SetEnv=..." parameters in order to 
support the Git protocol version 2. At the moment TortoiseGit 
automatically sets the environment variable "GIT_SSH_VARIANT=ssh". This 
works, but is not perfect if other parameter of OpenSSH are used. Would 
it make sense to add a new ssh variant tortoisegitplink? If yes, how to 
handle new versions that might also support even more OpenSSH command 
line parameters?

-- 
Best regards,
  Sven Strickroth
  PGP key id F5A9D4C4 @ any key-server

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] Drop unneeded special handling of ssh variant tortoiseplink
  2021-10-22 16:13 tortoiseplink ssh variant still needed? Sven Strickroth
@ 2021-10-22 16:45 ` Sven Strickroth
  2021-10-23  9:57   ` Ævar Arnfjörð Bjarmason
  2021-10-23 21:53 ` tortoiseplink ssh variant still needed? Junio C Hamano
  1 sibling, 1 reply; 5+ messages in thread
From: Sven Strickroth @ 2021-10-22 16:45 UTC (permalink / raw)
  To: Sven Strickroth, git, Junio C Hamano, Johannes Schindelin

"-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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] Drop unneeded special handling of ssh variant tortoiseplink
  2021-10-22 16:45 ` [PATCH] Drop unneeded special handling of ssh variant tortoiseplink Sven Strickroth
@ 2021-10-23  9:57   ` Ævar Arnfjörð Bjarmason
  0 siblings, 0 replies; 5+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2021-10-23  9:57 UTC (permalink / raw)
  To: Sven Strickroth; +Cc: git, Junio C Hamano, Johannes Schindelin


On Fri, Oct 22 2021, Sven Strickroth wrote:

> "-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.

In reply to your other mail:

> Therefore, my first question: Does Git still want to support very old
> versions of tortoiseplink or should I provide a patch which drops 
> support for it?

The answer is it depends, in some cases we support >10 year old software
because it's in wide use, so some sort of vague estimate of how much
this is likely to impact users would be helpful, i.e. are users who are
using a modern git likely to have a modern version of the software as
well, or do they mix & match?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: tortoiseplink ssh variant still needed?
  2021-10-22 16:13 tortoiseplink ssh variant still needed? Sven Strickroth
  2021-10-22 16:45 ` [PATCH] Drop unneeded special handling of ssh variant tortoiseplink Sven Strickroth
@ 2021-10-23 21:53 ` Junio C Hamano
  2021-10-25 13:04   ` Johannes Schindelin
  1 sibling, 1 reply; 5+ messages in thread
From: Junio C Hamano @ 2021-10-23 21:53 UTC (permalink / raw)
  To: Sven Strickroth; +Cc: git, Johannes Schindelin

Sven Strickroth <email@cs-ware.de> writes:

> IIRC tortoiseplink was initially created by TortoiseCVS which is
> nowadays not maintained any more 
> (<http://www.tortoisecvs.org/download.shtml>).
> In TortoiseSVN and TortoiseGit tortoiseplink was modified six years
> ago (around 2015-03-07) to ignore the "--batch" parameter and also
> accept "-p" additionally to "-P"  (cf. 
> <https://osdn.net/projects/tortoisesvn/scm/svn/commits/26348>).
>
> Therefore, my first question: Does Git still want to support very old
> versions of tortoiseplink or should I provide a patch which drops 
> support for it?

You sent the question to me so I am answering, but this depends on
(1) who the users who use TortoisePlink are and (2) by dropping
support for it, what we would gain.

I am guessing that nobody other than those on Windows use
TortoisePlink, and that everybody other than those who build their
own Git from source use Dscho's Git-for-Windows, and I further
assume that the GfW comes with its own copy of OpenSSH.

So our intended audience is those who started using Git on Windows
back when TortoisePlink was still a thing, are still happily using
TortoisePlink, and are willing to only update Git but not migrate to
OpenSSH.  How big that audience is, I do not know, as I do not do
Windows.

How much maintenance burden is the "support" costing us?  A quick
scan in connect.c tells me that the "add --batch to the command
line" would be the only thing we would be able to shed; everything
else seems to be shared with plink and putty.

So...?


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: tortoiseplink ssh variant still needed?
  2021-10-23 21:53 ` tortoiseplink ssh variant still needed? Junio C Hamano
@ 2021-10-25 13:04   ` Johannes Schindelin
  0 siblings, 0 replies; 5+ messages in thread
From: Johannes Schindelin @ 2021-10-25 13:04 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Sven Strickroth, git

Hi Junio,

On Sat, 23 Oct 2021, Junio C Hamano wrote:

> Sven Strickroth <email@cs-ware.de> writes:
>
> > Therefore, my first question: Does Git still want to support very old
> > versions of tortoiseplink or should I provide a patch which drops
> > support for it?
>
> [...]
>
> I am guessing that nobody other than those on Windows use
> TortoisePlink, and that everybody other than those who build their
> own Git from source use Dscho's Git-for-Windows, and I further
> assume that the GfW comes with its own copy of OpenSSH.
>
> So our intended audience is those who started using Git on Windows
> back when TortoisePlink was still a thing, are still happily using
> TortoisePlink, and are willing to only update Git but not migrate to
> OpenSSH.  How big that audience is, I do not know, as I do not do
> Windows.

Nobody really knows, but we started discouraging `plink` usage (also
`tortoiseplink` usage) already way back in the msysGit days. AFAIR we
simply ran into too much trouble, and started to only offer `plink` as an
option if the user had _any_ PuTTY saved sessions.

> How much maintenance burden is the "support" costing us?  A quick
> scan in connect.c tells me that the "add --batch to the command
> line" would be the only thing we would be able to shed; everything
> else seems to be shared with plink and putty.

Since I have to assume a very small usership, I would think that we can
drop support for the older `tortoiseplink`. But you're right, what does it
_buy_ us?

My guess is that Sven wants to go further and enable the `-o SetEnv` thing
for protocol v2 (which we figured out together, over in the Git for
Windows bug tracker, to be turned off when pushing). But that would
require the `tortoisegitplink` variant, I think.

So maybe a better idea would be to focus on introducing support for
`tortoisegitplink` and work on the `-o SetEnv` issue, and leave the
`--batch` code alone for now.

Ciao,
Dscho

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-10-25 13:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-22 16:13 tortoiseplink ssh variant still needed? Sven Strickroth
2021-10-22 16:45 ` [PATCH] Drop unneeded special handling of ssh variant tortoiseplink Sven Strickroth
2021-10-23  9:57   ` Ævar Arnfjörð Bjarmason
2021-10-23 21:53 ` tortoiseplink ssh variant still needed? Junio C Hamano
2021-10-25 13:04   ` Johannes Schindelin

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).