determines what kind of repository we got
(remote_url: &str)
| 331 | |
| 332 | /// determines what kind of repository we got |
| 333 | fn determine_repo_kind(remote_url: &str) -> RepoKind { |
| 334 | if remote_url.starts_with("git@") { |
| 335 | RepoKind::RemoteSsh |
| 336 | } else if remote_url.starts_with("http://") { |
| 337 | RepoKind::RemoteHttp |
| 338 | } else if remote_url.starts_with("https://") { |
| 339 | RepoKind::RemoteHttps |
| 340 | } else if Path::new(remote_url).exists() { |
| 341 | RepoKind::LocalFolder |
| 342 | } else { |
| 343 | RepoKind::Invalid |
| 344 | } |
| 345 | } |
| 346 | |
| 347 | #[cfg(test)] |
| 348 | mod tests { |
no outgoing calls