Skip to content

Commit d6ac5fa

Browse files
committed
Add support for "git+ssh" and "ssh+git" urls
Doubles the amount of baseline tests that pass :)
1 parent a9561cd commit d6ac5fa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

gix-url/src/scheme.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ pub enum Scheme {
2424
impl<'a> From<&'a str> for Scheme {
2525
fn from(value: &'a str) -> Self {
2626
match value {
27-
"ssh" => Scheme::Ssh,
27+
// "ssh+git" and "git+ssh" are legacy, but Git still allows them and so should we
28+
"ssh" | "ssh+git" | "git+ssh" => Scheme::Ssh,
2829
"file" => Scheme::File,
2930
"git" => Scheme::Git,
3031
"http" => Scheme::Http,

0 commit comments

Comments
 (0)