Thread (4 messages) flat view 4 messages, 2 authors, 2016-06-15
STALE3722d

[PATCH] connect.c: Tell *PLink to always use ssh protocol

From: Sven Strickroth <hidden>
Date: 2016-06-15 22:56:04
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help