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>)
| 365 | /// Returns a [`CliError`] with helpful suggestions if the repository |
| 366 | /// cannot be found or opened. |
| 367 | pub fn require_repository(path: Option<&Path>) -> CliResult<Repository> { |
| 368 | open_repository(path) |
| 369 | } |
| 370 | |
| 371 | // Formatting Utilities |
| 372 |
no test coverage detected