Use the explicit remote first, then the repository default.
(&self, repo: &Repository)
| 180 | |
| 181 | /// Use the explicit remote first, then the repository default. |
| 182 | fn resolve_remote_name(&self, repo: &Repository) -> String { |
| 183 | match &self.remote { |
| 184 | Some(name) => name.clone(), |
| 185 | None => repo |
| 186 | .get_default_remote() |
| 187 | .map(|(name, _entry)| name) |
| 188 | .unwrap_or_else(|_| DEFAULT_REMOTE.to_string()), |
| 189 | } |
| 190 | } |
| 191 | |
| 192 | /// Builder: set the dry-run flag. |
| 193 | pub fn with_dry_run(mut self, dry_run: bool) -> Self { |
no test coverage detected