From 33227548ba69857102b928e373a0e023ee59c7da Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Sun, 15 Jun 2008 15:53:57 -0400 Subject: [PATCH] Fix custom ports with plink (without debugging output) PuTTY requires -P while OpenSSH requires -p; if plink is detected as GIT_SSH, use the alternate flag. [spr: This commit switched off plink's debugging output, which was enabled by the previous commit. ] Signed-off-by: Edward Z. Yang Signed-off-by: Steffen Prohaska --- connect.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/connect.c b/connect.c index 6bd7ec9117..11fa151eb3 100644 --- a/connect.c +++ b/connect.c @@ -597,20 +597,13 @@ struct child_process *git_connect(int fd[2], const char *url_orig, conn->in = conn->out = -1; /* be sure to increase this size if you add more args */ - conn->argv = arg = xcalloc(8, sizeof(*arg)); + conn->argv = arg = xcalloc(6, sizeof(*arg)); if (protocol == PROTO_SSH) { const char *ssh = getenv("GIT_SSH"); int putty = ssh && strstr(ssh, "plink"); if (!ssh) ssh = "ssh"; *arg++ = ssh; - if (putty) { - /* stdin forwarding doesn't work, so give informative error messages - * (-v) and don't hang (-batch). - */ - *arg++ = "-batch"; - *arg++ = "-v"; - } if (port) { /* P is for PuTTY, p is for OpenSSH */ *arg++ = putty ? "-P" : "-p";