MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / set_remote_url

Method set_remote_url

atomic-repository/src/repository/remotes.rs:159–163  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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 ///

Callers 1

set_urlMethod · 0.80

Calls 3

load_remotesMethod · 0.80
save_remotesMethod · 0.80
set_urlMethod · 0.45

Tested by

no test coverage detected