{"thread":{"id":"56764","subject":"tortoiseplink ssh variant still needed?","startedAt":"2021-10-22T16:19:16Z","lastAt":"2021-10-25T13:04:48Z","messageCount":5,"participants":["Sven Strickroth","Ævar Arnfjörð Bjarmason","Junio C Hamano","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"439390","messageId":"dad761bf-3121-8934-fad6-78610bc21121@cs-ware.de","threadId":"56764","inReplyTo":null,"subject":"tortoiseplink ssh variant still needed?","fromName":"Sven Strickroth","fromEmail":"email@cs-ware.de","sentAt":"2021-10-22T16:13:20Z","receivedAt":"2021-10-22T16:19:16Z","isPatch":false,"sender":{"key":"email@cs-ware.de","avatar":"https://avatars.githubusercontent.com/u/428133?v=4"},"body":"Hi,\n\nGit differentiates between different variants of SSH tools.\n\nOne variant is the tortoiseplink variant. When this is configured Git \npasses passes a special \"--batch\" parameter and passes the port using \n\"-P\" (capitalized P) t the SSH tool.\n\nIIRC tortoiseplink was initially created by TortoiseCVS which is \nnowadays not maintained any more \n(<http://www.tortoisecvs.org/download.shtml>).\nIn TortoiseSVN and TortoiseGit tortoiseplink was modified six years ago \n(around 2015-03-07) to ignore the \"--batch\" parameter and also accept \n\"-p\" additionally to \"-P\"  (cf. \n<https://osdn.net/projects/tortoisesvn/scm/svn/commits/26348>).\n\nTherefore, my first question: Does Git still want to support very old \nversions of tortoiseplink or should I provide a patch which drops \nsupport for it?\n\nSecond question:\nTortoiseGit comes with an even more improved version of TortoisePLink \n(named TortoiseGitPLink, but also ships the same binary as \ntortoiseplink) that also accepts \"-o SetEnv=...\" parameters in order to \nsupport the Git protocol version 2. At the moment TortoiseGit \nautomatically sets the environment variable \"GIT_SSH_VARIANT=ssh\". This \nworks, but is not perfect if other parameter of OpenSSH are used. Would \nit make sense to add a new ssh variant tortoisegitplink? If yes, how to \nhandle new versions that might also support even more OpenSSH command \nline parameters?\n\n-- \nBest regards,\n  Sven Strickroth\n  PGP key id F5A9D4C4 @ any key-server\n"},{"id":"439391","messageId":"82c63c23-446a-1945-0083-f1f5af6d43e8@cs-ware.de","threadId":"56764","inReplyTo":"dad761bf-3121-8934-fad6-78610bc21121@cs-ware.de","subject":"[PATCH] Drop unneeded special handling of ssh variant tortoiseplink","fromName":"Sven Strickroth","fromEmail":"email@cs-ware.de","sentAt":"2021-10-22T16:45:29Z","receivedAt":"2021-10-22T16:50:35Z","isPatch":true,"sender":{"key":"email@cs-ware.de","avatar":"https://avatars.githubusercontent.com/u/428133?v=4"},"body":"\"-p\" is supported and \"--batch\" is ignored in TortoisePLink from\nTortoiseSVN and TortoiseGit since at least March 2015 (and TortoiseCVS\nis not maintained any more). Therefore, there is no need any more to\nkeep these parameters for ancient versions of tortoiseplink.\n\nSigned-off-by: Sven Strickroth <email@cs-ware.de>\n---\n Documentation/config/ssh.txt | 2 +-\n connect.c                    | 5 +----\n t/t5601-clone.sh             | 4 ++--\n 3 files changed, 4 insertions(+), 7 deletions(-)\n\ndiff --git a/Documentation/config/ssh.txt b/Documentation/config/ssh.txt\nindex 2ca4bf93e1..3902c8371d 100644\n--- a/Documentation/config/ssh.txt\n+++ b/Documentation/config/ssh.txt\n@@ -27,7 +27,7 @@ follows:\n \n * `plink` or `putty` - [-P port] [-4] [-6] [username@]host command\n \n-* `tortoiseplink` - [-P port] [-4] [-6] -batch [username@]host command\n+* `tortoiseplink` - [-p port] [-4] [-6] [username@]host command\n \n --\n +\ndiff --git a/connect.c b/connect.c\nindex eaf7d6d261..2628c2fc17 100644\n--- a/connect.c\n+++ b/connect.c\n@@ -1269,9 +1269,6 @@ static void push_ssh_options(struct strvec *args, struct strvec *env,\n \t\t}\n \t}\n \n-\tif (variant == VARIANT_TORTOISEPLINK)\n-\t\tstrvec_push(args, \"-batch\");\n-\n \tif (port) {\n \t\tswitch (variant) {\n \t\tcase VARIANT_AUTO:\n@@ -1279,11 +1276,11 @@ static void push_ssh_options(struct strvec *args, struct strvec *env,\n \t\tcase VARIANT_SIMPLE:\n \t\t\tdie(_(\"ssh variant 'simple' does not support setting port\"));\n \t\tcase VARIANT_SSH:\n+\t\tcase VARIANT_TORTOISEPLINK:\n \t\t\tstrvec_push(args, \"-p\");\n \t\t\tbreak;\n \t\tcase VARIANT_PLINK:\n \t\tcase VARIANT_PUTTY:\n-\t\tcase VARIANT_TORTOISEPLINK:\n \t\t\tstrvec_push(args, \"-P\");\n \t\t}\n \ndiff --git a/t/t5601-clone.sh b/t/t5601-clone.sh\nindex 83c24fc97a..41e1670328 100755\n--- a/t/t5601-clone.sh\n+++ b/t/t5601-clone.sh\n@@ -430,7 +430,7 @@ test_expect_success 'plink.exe is treated specially (as putty)' '\n test_expect_success 'tortoiseplink is like putty, with extra arguments' '\n \tcopy_ssh_wrapper_as \"$TRASH_DIRECTORY/tortoiseplink\" &&\n \tgit clone \"[myhost:123]:src\" ssh-bracket-clone-plink-2 &&\n-\texpect_ssh \"-batch -P 123\" myhost src\n+\texpect_ssh \"-p 123\" myhost src\n '\n \n test_expect_success 'double quoted plink.exe in GIT_SSH_COMMAND' '\n@@ -472,7 +472,7 @@ test_expect_success 'GIT_SSH_VARIANT overrides plink to tortoiseplink' '\n \tcopy_ssh_wrapper_as \"$TRASH_DIRECTORY/plink\" &&\n \tGIT_SSH_VARIANT=tortoiseplink \\\n \tgit clone \"[myhost:123]:src\" ssh-bracket-clone-variant-4 &&\n-\texpect_ssh \"-batch -P 123\" myhost src\n+\texpect_ssh \"-p 123\" myhost src\n '\n \n test_expect_success 'clean failure on broken quoting' '\n-- \n2.33.1.windows.1\n\n"},{"id":"439445","messageId":"211023.86o87ghxfq.gmgdl@evledraar.gmail.com","threadId":"56764","inReplyTo":"82c63c23-446a-1945-0083-f1f5af6d43e8@cs-ware.de","subject":"Re: [PATCH] Drop unneeded special handling of ssh variant tortoiseplink","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2021-10-23T09:57:57Z","receivedAt":"2021-10-23T10:01:34Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Fri, Oct 22 2021, Sven Strickroth wrote:\n\n> \"-p\" is supported and \"--batch\" is ignored in TortoisePLink from\n> TortoiseSVN and TortoiseGit since at least March 2015 (and TortoiseCVS\n> is not maintained any more). Therefore, there is no need any more to\n> keep these parameters for ancient versions of tortoiseplink.\n\nIn reply to your other mail:\n\n> Therefore, my first question: Does Git still want to support very old\n> versions of tortoiseplink or should I provide a patch which drops \n> support for it?\n\nThe answer is it depends, in some cases we support >10 year old software\nbecause it's in wide use, so some sort of vague estimate of how much\nthis is likely to impact users would be helpful, i.e. are users who are\nusing a modern git likely to have a modern version of the software as\nwell, or do they mix & match?\n"},{"id":"439463","messageId":"xmqqtuh79zmq.fsf@gitster.g","threadId":"56764","inReplyTo":"dad761bf-3121-8934-fad6-78610bc21121@cs-ware.de","subject":"Re: tortoiseplink ssh variant still needed?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-10-23T21:53:33Z","receivedAt":"2021-10-23T21:53:37Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Sven Strickroth <email@cs-ware.de> writes:\n\n> IIRC tortoiseplink was initially created by TortoiseCVS which is\n> nowadays not maintained any more \n> (<http://www.tortoisecvs.org/download.shtml>).\n> In TortoiseSVN and TortoiseGit tortoiseplink was modified six years\n> ago (around 2015-03-07) to ignore the \"--batch\" parameter and also\n> accept \"-p\" additionally to \"-P\"  (cf. \n> <https://osdn.net/projects/tortoisesvn/scm/svn/commits/26348>).\n>\n> Therefore, my first question: Does Git still want to support very old\n> versions of tortoiseplink or should I provide a patch which drops \n> support for it?\n\nYou sent the question to me so I am answering, but this depends on\n(1) who the users who use TortoisePlink are and (2) by dropping\nsupport for it, what we would gain.\n\nI am guessing that nobody other than those on Windows use\nTortoisePlink, and that everybody other than those who build their\nown Git from source use Dscho's Git-for-Windows, and I further\nassume that the GfW comes with its own copy of OpenSSH.\n\nSo our intended audience is those who started using Git on Windows\nback when TortoisePlink was still a thing, are still happily using\nTortoisePlink, and are willing to only update Git but not migrate to\nOpenSSH.  How big that audience is, I do not know, as I do not do\nWindows.\n\nHow much maintenance burden is the \"support\" costing us?  A quick\nscan in connect.c tells me that the \"add --batch to the command\nline\" would be the only thing we would be able to shed; everything\nelse seems to be shared with plink and putty.\n\nSo...?\n\n"},{"id":"439543","messageId":"nycvar.QRO.7.76.6.2110251459100.62@tvgsbejvaqbjf.bet","threadId":"56764","inReplyTo":"xmqqtuh79zmq.fsf@gitster.g","subject":"Re: tortoiseplink ssh variant still needed?","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2021-10-25T13:04:35Z","receivedAt":"2021-10-25T13:04:48Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Sat, 23 Oct 2021, Junio C Hamano wrote:\n\n> Sven Strickroth <email@cs-ware.de> writes:\n>\n> > Therefore, my first question: Does Git still want to support very old\n> > versions of tortoiseplink or should I provide a patch which drops\n> > support for it?\n>\n> [...]\n>\n> I am guessing that nobody other than those on Windows use\n> TortoisePlink, and that everybody other than those who build their\n> own Git from source use Dscho's Git-for-Windows, and I further\n> assume that the GfW comes with its own copy of OpenSSH.\n>\n> So our intended audience is those who started using Git on Windows\n> back when TortoisePlink was still a thing, are still happily using\n> TortoisePlink, and are willing to only update Git but not migrate to\n> OpenSSH.  How big that audience is, I do not know, as I do not do\n> Windows.\n\nNobody really knows, but we started discouraging `plink` usage (also\n`tortoiseplink` usage) already way back in the msysGit days. AFAIR we\nsimply ran into too much trouble, and started to only offer `plink` as an\noption if the user had _any_ PuTTY saved sessions.\n\n> How much maintenance burden is the \"support\" costing us?  A quick\n> scan in connect.c tells me that the \"add --batch to the command\n> line\" would be the only thing we would be able to shed; everything\n> else seems to be shared with plink and putty.\n\nSince I have to assume a very small usership, I would think that we can\ndrop support for the older `tortoiseplink`. But you're right, what does it\n_buy_ us?\n\nMy guess is that Sven wants to go further and enable the `-o SetEnv` thing\nfor protocol v2 (which we figured out together, over in the Git for\nWindows bug tracker, to be turned off when pushing). But that would\nrequire the `tortoisegitplink` variant, I think.\n\nSo maybe a better idea would be to focus on introducing support for\n`tortoisegitplink` and work on the `-o SetEnv` issue, and leave the\n`--batch` code alone for now.\n\nCiao,\nDscho\n"}]}