@@ -87,6 +87,8 @@ impl FromStr for Dependency {
8787 token. as_str( ) ,
8888 project. trim_end_matches( ".git" )
8989 ) )
90+ } else if dependency. starts_with ( "git@" ) {
91+ Some ( format ! ( "git@{brand}.{tld}:{}" , project. trim_end_matches( ".git" ) ) )
9092 } else {
9193 Some ( format ! ( "https://{brand}.{tld}/{}" , project. trim_end_matches( ".git" ) ) )
9294 }
@@ -176,17 +178,12 @@ mod tests {
176178 None ,
177179 ) ,
178180 (
179- "git@github.com:gakonst/lootloose@v1" ,
180- "https://github.com/gakonst/lootloose" ,
181- Some ( "v1" ) ,
182- None ,
183- ) ,
184- (
181+ "git@github.com:gakonst/lootloose@tag=v1" ,
185182 "git@github.com:gakonst/lootloose" ,
186- "https://github.com/gakonst/lootloose" ,
187- None ,
183+ Some ( "v1" ) ,
188184 None ,
189185 ) ,
186+ ( "git@github.com:gakonst/lootloose" , "git@github.com:gakonst/lootloose" , None , None ) ,
190187 (
191188 "https://gitlab.com/gakonst/lootloose" ,
192189 "https://gitlab.com/gakonst/lootloose" ,
@@ -237,8 +234,8 @@ mod tests {
237234 Some ( "loot" ) ,
238235 ) ,
239236 (
240- "loot=git@github.com:gakonst/lootloose@v1" ,
241- "https:// github.com/ gakonst/lootloose" ,
237+ "loot=git@github.com:gakonst/lootloose@tag= v1" ,
238+ "git@ github.com: gakonst/lootloose" ,
242239 Some ( "v1" ) ,
243240 Some ( "loot" ) ,
244241 ) ,
0 commit comments