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

Method remove

atomic-repository/src/remote.rs:526–532  ·  view source on GitHub ↗

Remove a remote by name. # Arguments `name` - The name of the remote to remove # Errors Returns an error if the remote doesn't exist. # Example ```rust use atomic_repository::remote::{RemoteConfig, RemoteEntry}; let mut config = RemoteConfig::new(); config.add("origin", RemoteEntry::new("https://example.com/repo")).unwrap(); config.remove("origin").unwrap(); assert!(!config.contains("origin

(&mut self, name: &str)

Source from the content-addressed store, hash-verified

524 /// assert!(!config.contains("origin"));
525 /// ```
526 pub fn remove(&mut self, name: &str) -> RemoteResult<RemoteEntry> {
527 self.remotes
528 .remove(name)
529 .ok_or_else(|| RemoteError::NotFound {
530 name: name.to_string(),
531 })
532 }
533
534 /// Update the URL of an existing remote.
535 ///

Callers

nothing calls this directly

Calls 1

removeMethod · 0.65

Tested by

no test coverage detected