Use the explicit remote first, then the repository default.
(&self, repo: &Repository)
| 250 | |
| 251 | /// Use the explicit remote first, then the repository default. |
| 252 | fn resolve_remote_name(&self, repo: &Repository) -> String { |
| 253 | match &self.remote { |
| 254 | Some(name) => name.clone(), |
| 255 | None => repo |
| 256 | .get_default_remote() |
| 257 | .map(|(name, _entry)| name) |
| 258 | .unwrap_or_else(|_| DEFAULT_REMOTE.to_string()), |
| 259 | } |
| 260 | } |
| 261 | |
| 262 | /// Resolve the remote and optional identity override. |
| 263 | fn resolve_remote_url(&self, repo: &Repository) -> CliResult<(String, String, Option<String>)> { |
no test coverage detected