mirror of
https://github.com/git/git.git
synced 2026-04-02 13:00:08 +02:00
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 <johannes.schindelin@gmx.de>
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user