Use the explicit remote first, then the repository default.
(&self, repo: &Repository)
| 211 | |
| 212 | /// Use the explicit remote first, then the repository default. |
| 213 | fn resolve_remote_name(&self, repo: &Repository) -> String { |
| 214 | match &self.remote { |
| 215 | Some(name) => name.clone(), |
| 216 | None => repo |
| 217 | .get_default_remote() |
| 218 | .map(|(name, _entry)| name) |
| 219 | .unwrap_or_else(|_| DEFAULT_REMOTE.to_string()), |
| 220 | } |
| 221 | } |
| 222 | |
| 223 | /// Builder: set the dry-run flag. |
| 224 | pub fn with_dry_run(mut self, dry_run: bool) -> Self { |
no test coverage detected