Open a repository for explicit native-index repair without implicit migration.
(path: Option<&Path>)
| 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> { |
| 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 |
no test coverage detected