summaryrefslogtreecommitdiff
path: root/connect.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-09-28 15:28:26 -0700
committerJunio C Hamano <gitster@pobox.com>2015-09-28 15:28:31 -0700
commit6343e2f6f271cf344ea8e7384342502faecaf37c (patch)
tree50abed20e4b930022a24b64389915f7c774acef9 /connect.c
parent74b67638166ca2e66497ede559dbf393e7af8b40 (diff)
parent18b58f707fdb3ad7d3d4931bd40693834c9ec8a0 (diff)
downloadgit-6343e2f6f271cf344ea8e7384342502faecaf37c.tar.gz
Sync with 2.3.10
Diffstat (limited to 'connect.c')
-rw-r--r--connect.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/connect.c b/connect.c
index c0144d859a..27a706f766 100644
--- a/connect.c
+++ b/connect.c
@@ -9,6 +9,7 @@
#include "url.h"
#include "string-list.h"
#include "sha1-array.h"
+#include "transport.h"
static char *server_capabilities;
static const char *parse_feature_value(const char *, const char *, int *);
@@ -694,6 +695,8 @@ struct child_process *git_connect(int fd[2], const char *url,
else
target_host = xstrdup(hostandport);
+ transport_check_allowed("git");
+
/* These underlying connection commands die() if they
* cannot connect.
*/
@@ -727,6 +730,7 @@ struct child_process *git_connect(int fd[2], const char *url,
int putty, tortoiseplink = 0;
char *ssh_host = hostandport;
const char *port = NULL;
+ transport_check_allowed("ssh");
get_host_and_port(&ssh_host, &port);
if (!port)
@@ -781,6 +785,7 @@ struct child_process *git_connect(int fd[2], const char *url,
/* remove repo-local variables from the environment */
conn->env = local_repo_env;
conn->use_shell = 1;
+ transport_check_allowed("file");
}
argv_array_push(&conn->args, cmd.buf);