Use the explicit remote first, then the repository default.
(&self, repo: &Repository)
| 291 | |
| 292 | /// Use the explicit remote first, then the repository default. |
| 293 | fn resolve_remote_name(&self, repo: &Repository) -> String { |
| 294 | match &self.remote { |
| 295 | Some(name) => name.clone(), |
| 296 | None => repo |
| 297 | .get_default_remote() |
| 298 | .map(|(name, _entry)| name) |
| 299 | .unwrap_or_else(|_| DEFAULT_REMOTE.to_string()), |
| 300 | } |
| 301 | } |
| 302 | |
| 303 | /// Builder: set the dry-run flag. |
| 304 | pub fn with_dry_run(mut self, dry_run: bool) -> Self { |
no test coverage detected