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

Method add_remote_default

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

Add a new remote and set it as the default. # Arguments `name` - The name for the new remote `url` - The URL of the remote repository

(&self, name: &str, url: &str)

Source from the content-addressed store, hash-verified

124 /// * `name` - The name for the new remote
125 /// * `url` - The URL of the remote repository
126 pub fn add_remote_default(&self, name: &str, url: &str) -> Result<(), RepositoryError> {
127 let mut config = self.load_remotes()?;
128 config
129 .add(name, RemoteEntry::new_default(url))
130 .map_err(RepositoryError::Remote)?;
131 self.save_remotes(&config)
132 }
133
134 /// Remove a remote.
135 ///

Callers 2

add_remoteMethod · 0.80
run_asyncMethod · 0.80

Calls 3

load_remotesMethod · 0.80
save_remotesMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected