Use the explicit remote first, then the repository default.
(&self, repo: &Repository)
| 353 | |
| 354 | /// Use the explicit remote first, then the repository default. |
| 355 | fn resolve_remote_name(&self, repo: &Repository) -> String { |
| 356 | match &self.remote { |
| 357 | Some(name) => name.clone(), |
| 358 | None => repo |
| 359 | .get_default_remote() |
| 360 | .map(|(name, _entry)| name) |
| 361 | .unwrap_or_else(|_| DEFAULT_REMOTE.to_string()), |
| 362 | } |
| 363 | } |
| 364 | |
| 365 | /// Resolve the remote and optional identity override. |
| 366 | fn resolve_remote_url(&self, repo: &Repository) -> CliResult<(String, String, Option<String>)> { |
no test coverage detected