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

Function require_repository_for_native_check

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

Open a repository for native-index checking without implicit migration.

(path: Option<&Path>)

Source from the content-addressed store, hash-verified

474
475/// Open a repository for native-index checking without implicit migration.
476pub fn require_repository_for_native_check(path: Option<&Path>) -> CliResult<Repository> {
477 let repo_path = match path {
478 Some(path) if path.join(DOT_DIR).is_dir() => path.to_path_buf(),
479 Some(path) => find_repository_root_from(path)?,
480 None => find_repository_root()?,
481 };
482 Repository::open_readonly_for_native_repair(repo_path).map_err(CliError::from)
483}
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> {

Callers 1

runMethod · 0.85

Calls 3

find_repository_rootFunction · 0.85
is_dirMethod · 0.80

Tested by

no test coverage detected