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 <ilari.liusvaara@elisanet.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Ilari Liusvaara committed
Jan 9, 2010 at 19:28 UTC
27a557a9ff9273ad47aa29c52e9903cf6405f7f7
1 file changed
+3
transport.c
+3
@@ -875,6 +875,9 @@ struct transport *transport_get(struct remote *remote, const char *url)
875
url = remote->url[0];
876
ret->url = url;
877
878
+ /* In case previous URL had helper forced, reset it. */
879
+ remote->foreign_vcs = NULL;
880
+
881
/* maybe it is a foreign URL? */
882
if (url) {
883
const char *p = url;