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

Function shim_config

atomic-cli/src/commands/git/shim.rs:787–793  ·  view source on GitHub ↗

Load the repository configuration for `root` (review R4: the shim consent surface is read where it is acted on, not only in tests).

(root: &Path)

Source from the content-addressed store, hash-verified

785/// Load the repository configuration for `root` (review R4: the shim
786/// consent surface is read where it is acted on, not only in tests).
787pub(crate) fn shim_config(root: &Path) -> CliResult<atomic_config::RepoConfig> {
788 let config_path = Repository::canonical_dot_dir(root)
789 .map_err(CliError::from)?
790 .join("config.toml");
791 atomic_config::RepoConfig::load(&config_path)
792 .map_err(|error| git_error(format!("cannot load the repository configuration: {error}")))
793}
794
795/// Record the explicit shim consent in the repository configuration.
796/// Returns whether the file changed. Review R4: the CLI enable/disable

Callers 5

runMethod · 0.85
record_shim_opt_inFunction · 0.85
run_cutoverFunction · 0.85
run_watchFunction · 0.85

Calls 1

git_errorFunction · 0.70