From ac3f43986a2a5948d474adb21cd5fde78178d367 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 20 May 2009 13:42:04 +0200 Subject: [PATCH] Correctly detect Plink.exe, and avoid passing -batch to TortoisePlink On Windows, file names are case-insensitive, and some versions of TortoisePlink do not handle -batch well (i.e. they do not understand, neither ignore it). Signed-off-by: Johannes Schindelin --- connect.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/connect.c b/connect.c index db7020939a..692d476578 100644 --- a/connect.c +++ b/connect.c @@ -605,11 +605,11 @@ struct child_process *git_connect(int fd[2], const char *url_orig, conn->argv = arg = xcalloc(7, sizeof(*arg)); if (protocol == PROTO_SSH) { const char *ssh = getenv("GIT_SSH"); - int putty = ssh && strstr(ssh, "plink"); + int putty = ssh && strcasestr(ssh, "plink"); if (!ssh) ssh = "ssh"; *arg++ = ssh; - if (putty) + if (putty && !strcasestr(ssh, "tortoiseplink")) *arg++ = "-batch"; if (port) { /* P is for PuTTY, p is for OpenSSH */