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

Function require_repository

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

Open a repository or return a user-friendly error. This is a convenience wrapper around [`open_repository`] that provides more context in error messages, making it clearer what the user should do. # Arguments `path` - Optional path to the repository # Returns An open [`Repository`] handle. # Errors Returns a [`CliError`] with helpful suggestions if the repository cannot be found or opened.

(path: Option<&Path>)

Source from the content-addressed store, hash-verified

374/// Returns a [`CliError`] with helpful suggestions if the repository
375/// cannot be found or opened.
376pub fn require_repository(path: Option<&Path>) -> CliResult<Repository> {
377 open_repository(path)
378}
379
380// Formatting Utilities
381

Callers 4

complete_view_namesFunction · 0.85
complete_change_hashesFunction · 0.85
runMethod · 0.85
runMethod · 0.85

Calls 1

open_repositoryFunction · 0.85

Tested by

no test coverage detected