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

Function require_repository_for_native_repair

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

Open a repository for explicit native-index repair without implicit migration.

(path: Option<&Path>)

Source from the content-addressed store, hash-verified

484
485/// Open a repository for explicit native-index repair without implicit migration.
486pub fn require_repository_for_native_repair(path: Option<&Path>) -> CliResult<Repository> {
487 let repo_path = match path {
488 Some(path) if path.join(DOT_DIR).is_dir() => path.to_path_buf(),
489 Some(path) => find_repository_root_from(path)?,
490 None => find_repository_root()?,
491 };
492 Repository::open_for_native_repair(repo_path).map_err(CliError::from)
493}
494
495// Formatting Utilities
496

Callers 1

runMethod · 0.85

Calls 3

find_repository_rootFunction · 0.85
is_dirMethod · 0.80

Tested by

no test coverage detected