-
-
Notifications
You must be signed in to change notification settings - Fork 368
Closed
Description
Short code to highlight issue:
extern crate url;
use url::Url;
fn main() {
println!("1) {}", Url::parse("ssh://[email protected]/path/to/repo.git/").unwrap());
println!("2) {}", Url::parse("[email protected]:path/to/repo.git/").unwrap());
}
The first line parses, but the second fails with
thread 'main' panicked at 'called Result::unwrap() on an Err value: RelativeUrlWithoutBase', ../src/libcore/result.rs:788
straight from git help clone we see that the second is a valid format
The following syntaxes may be used with them:
o ssh://[user@]host.xz[:port]/path/to/repo.git/
o git://host.xz[:port]/path/to/repo.git/
o http[s]://host.xz[:port]/path/to/repo.git/
o ftp[s]://host.xz[:port]/path/to/repo.git/
o rsync://host.xz/path/to/repo.git/
An alternative scp-like syntax may also be used with the ssh protocol:
o [user@]host.xz:path/to/repo.git/
See https://secure.phabricator.com/T11004 for an explanation why the "scp-like" syntax is not exactly the same as the ssh syntax. For me, switching to the ssh style syntax is insufficient on its own.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels