Update the URL of an existing remote. # Arguments `name` - The name of the remote to update `url` - The new URL # Errors Returns an error if the remote doesn't exist or the URL is invalid.
(&self, name: &str, url: &str)
| 157 | /// |
| 158 | /// Returns an error if the remote doesn't exist or the URL is invalid. |
| 159 | pub fn set_remote_url(&self, name: &str, url: &str) -> Result<(), RepositoryError> { |
| 160 | let mut config = self.load_remotes()?; |
| 161 | config.set_url(name, url).map_err(RepositoryError::Remote)?; |
| 162 | self.save_remotes(&config) |
| 163 | } |
| 164 | |
| 165 | /// Set a remote as the default. |
| 166 | /// |
no test coverage detected