{"thread":{"id":"22146","subject":"[BUGFIX] Reset possible helper before reusing remote structure","startedAt":"2010-01-09T17:28:12Z","lastAt":"2010-01-09T17:28:12Z","messageCount":1,"participants":["Ilari Liusvaara"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"131187","messageId":"1263058092-20501-1-git-send-email-ilari.liusvaara@elisanet.fi","threadId":"22146","inReplyTo":null,"subject":"[BUGFIX] Reset possible helper before reusing remote structure","fromName":"Ilari Liusvaara","fromEmail":"ilari.liusvaara@elisanet.fi","sentAt":"2010-01-09T17:28:12Z","receivedAt":"2010-01-09T17:28:12Z","isPatch":false,"sender":{"key":"ilari.liusvaara@elisanet.fi","avatar":null},"body":"If one had multiple URLs configured for remote with previous one\nhaving forced helper but the subsequent one not, like:\n\nurl = foo::bar://baz\nurl = ssh://example/example.git\n\nThen the subsequent URL is passed to foo helper, which isn't\ncorrect. Fix it to be parsed normally by resetting foreign VCS\nname before parsing the URL protocol.\n\nSigned-off-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>\n---\n transport.c |    3 +++\n 1 files changed, 3 insertions(+), 0 deletions(-)\n\ndiff --git a/transport.c b/transport.c\nindex 97bb5e6..669bc85 100644\n--- a/transport.c\n+++ b/transport.c\n@@ -875,6 +875,9 @@ struct transport *transport_get(struct remote *remote, const char *url)\n \t\turl = remote->url[0];\n \tret->url = url;\n \n+\t/* In case previous URL had helper forced, reset it. */\n+\tremote->foreign_vcs = NULL;\n+\n \t/* maybe it is a foreign URL? */\n \tif (url) {\n \t\tconst char *p = url;\n-- \n1.6.6.3.gaa2e1\n"}]}