public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Sven Strickroth <sven.strickroth@tu-clausthal•de>
To: git@vger•kernel.org
Cc: gitster@pobox•com, Jeff King <peff@peff•net>
Subject: [PATCH] connect.c: Tell *PLink to always use ssh protocol
Date: Wed, 06 Feb 2013 22:58:49 +0100	[thread overview]
Message-ID: <5112D219.3020604@tu-clausthal.de> (raw)

Default values for *plink can be set using PuTTY. If a user makes
telnet the default in PuTTY this breaks ssh clones in git.

Since git clones of the type user@host:path use ssh, tell *plink
to use ssh and override PuTTY defaults for the protocol to use.

Signed-off-by: Sven Strickroth <email@cs-ware•de>
---
 connect.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/connect.c b/connect.c
index 49e56ba..d337b6f 100644
--- a/connect.c
+++ b/connect.c
@@ -625,6 +625,8 @@ struct child_process *git_connect(int fd[2], const char *url_orig,
 		if (!ssh) ssh = "ssh";
 
 		*arg++ = ssh;
+		if (putty)
+			*arg++ = "-ssh";
 		if (putty && !strcasestr(ssh, "tortoiseplink"))
 			*arg++ = "-batch";
 		if (port) {
-- 
Best regards,
 Sven Strickroth
 PGP key id F5A9D4C4 @ any key-server

             reply	other threads:[~2013-02-06 21:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-06 21:58 Sven Strickroth [this message]
2013-02-06 23:22 ` [PATCH] connect.c: Tell *PLink to always use ssh protocol Jeff King
2013-02-07  9:40   ` Sven Strickroth
2013-03-09 14:08   ` Sven Strickroth

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=5112D219.3020604@tu-clausthal.de \
    --to=sven.strickroth@tu-clausthal$(echo .)de \
    --cc=git@vger$(echo .)kernel.org \
    --cc=gitster@pobox$(echo .)com \
    --cc=peff@peff$(echo .)net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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