Open a repository for native-index checking without implicit migration.
(path: Option<&Path>)
| 474 | |
| 475 | /// Open a repository for native-index checking without implicit migration. |
| 476 | pub 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. |
| 486 | pub fn require_repository_for_native_repair(path: Option<&Path>) -> CliResult<Repository> { |
no test coverage detected