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

Function find_repository_root

atomic-cli/src/commands/mod.rs:260–263  ·  view source on GitHub ↗

Find the repository root by searching upward from the current directory. This function starts at the current working directory and walks up the directory tree looking for `.atomic/pristine.redb` or a sandbox pointer. This allows commands to work from any subdirectory within a repository without mistaking global configuration for a repository. # Returns The path to the repository root (the direc

()

Source from the content-addressed store, hash-verified

258/// println!("Repository found at: {}", repo_root.display());
259/// ```
260pub fn find_repository_root() -> CliResult<PathBuf> {
261 let cwd = std::env::current_dir().map_err(CliError::Io)?;
262 find_repository_root_from(&cwd)
263}
264
265/// Find the repository root starting from a specific path.
266///

Callers 15

runMethod · 0.85
runMethod · 0.85
open_repositoryFunction · 0.85
runMethod · 0.85
runMethod · 0.85
runMethod · 0.85
runMethod · 0.85
runMethod · 0.85
runMethod · 0.85
runMethod · 0.85
runMethod · 0.85
runMethod · 0.85

Calls 1

Tested by 3

runMethod · 0.68
runMethod · 0.68
runMethod · 0.68