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