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

Method load_remotes

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

Load remote configuration for this repository. # Returns The remote configuration, which may be empty if no remotes are configured. # Errors Returns an error if the config file exists but cannot be parsed. # Example ```rust,ignore let repo = Repository::open(".")?; let remotes = repo.load_remotes()?; if let Some(origin) = remotes.get("origin") { println!("Origin URL: {}", origin.url); } ```

(&self)

Source from the content-addressed store, hash-verified

24 /// }
25 /// ```
26 pub fn load_remotes(&self) -> Result<RemoteConfig, RepositoryError> {
27 RemoteConfig::load(self.config_path()).map_err(|e| RepositoryError::Config(e.to_string()))
28 }
29
30 /// Save remote configuration for this repository.
31 ///

Callers 10

get_remoteMethod · 0.80
get_default_remoteMethod · 0.80
add_remoteMethod · 0.80
add_remote_defaultMethod · 0.80
remove_remoteMethod · 0.80
set_remote_urlMethod · 0.80
set_default_remoteMethod · 0.80
rename_remoteMethod · 0.80
list_remotesMethod · 0.80
has_remoteMethod · 0.80

Calls 1

config_pathMethod · 0.45

Tested by

no test coverage detected