fetcher git: don't prepend ssh:// when using git://
This commit is contained in:
parent
3a571c7baf
commit
4d42639fcb
|
@ -60,13 +60,22 @@ namespace SparkleLib {
|
||||||
} else {
|
} else {
|
||||||
server = server.TrimEnd ("/".ToCharArray ());
|
server = server.TrimEnd ("/".ToCharArray ());
|
||||||
|
|
||||||
if (server.StartsWith ("ssh://"))
|
string protocol = "";
|
||||||
|
|
||||||
|
if (server.StartsWith ("ssh://")) {
|
||||||
|
server = server.Substring (6);
|
||||||
|
protocol = "ssh://";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (server.StartsWith ("git://")) {
|
||||||
server = server.Substring (6);
|
server = server.Substring (6);
|
||||||
|
protocol = "git://";
|
||||||
|
}
|
||||||
|
|
||||||
if (!server.Contains ("@"))
|
if (!server.Contains ("@"))
|
||||||
server = "git@" + server;
|
server = "git@" + server;
|
||||||
|
|
||||||
server = "ssh://" + server;
|
server = protocol + server;
|
||||||
}
|
}
|
||||||
|
|
||||||
base.target_folder = target_folder;
|
base.target_folder = target_folder;
|
||||||
|
|
Loading…
Reference in a new issue