path: root/transport.c
diff options
authorIlari Liusvaara <>2010-01-09 17:28:12 (GMT)
committerJunio C Hamano <>2010-01-10 06:38:49 (GMT)
commit27a557a9ff9273ad47aa29c52e9903cf6405f7f7 (patch)
treeea1bead80a5cbadf90e7a47984bae5746a8962e4 /transport.c
parent28ca0c90080ec933d82b0f7d050ea5fde2816c57 (diff)
Reset possible helper before reusing remote structure
If one had multiple URLs configured for remote with previous one having forced helper but the subsequent one not, like: url = foo::bar://baz url = ssh://example/example.git Then the subsequent URL is passed to foo helper, which isn't correct. Fix it to be parsed normally by resetting foreign VCS name before parsing the URL protocol. Signed-off-by: Ilari Liusvaara <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'transport.c')
1 files changed, 3 insertions, 0 deletions
diff --git a/transport.c b/transport.c
index 652bf0b..b5332c0 100644
--- a/transport.c
+++ b/transport.c
@@ -875,6 +875,9 @@ struct transport *transport_get(struct remote *remote, const char *url)
url = remote->url[0];
ret->url = url;
+ /* In case previous URL had helper forced, reset it. */
+ remote->foreign_vcs = NULL;
/* maybe it is a foreign URL? */
if (url) {
const char *p = url;