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

Method rename_remote

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

Rename a remote. # Arguments `old_name` - The current name of the remote `new_name` - The new name for the remote

(&self, old_name: &str, new_name: &str)

Source from the content-addressed store, hash-verified

184 /// * `old_name` - The current name of the remote
185 /// * `new_name` - The new name for the remote
186 pub fn rename_remote(&self, old_name: &str, new_name: &str) -> Result<(), RepositoryError> {
187 let mut config = self.load_remotes()?;
188 config
189 .rename(old_name, new_name)
190 .map_err(RepositoryError::Remote)?;
191 self.save_remotes(&config)
192 }
193
194 /// List all configured remotes.
195 ///

Callers

nothing calls this directly

Calls 3

load_remotesMethod · 0.80
save_remotesMethod · 0.80
renameMethod · 0.45

Tested by

no test coverage detected