Open a repository without migration, recovery, or table-initialization writes.
(path: Option<&Path>)
| 393 | |
| 394 | /// Open a repository without migration, recovery, or table-initialization writes. |
| 395 | pub fn open_repository_readonly(path: Option<&Path>) -> CliResult<Repository> { |
| 396 | let repo_path = match path { |
| 397 | Some(path) if path.join(DOT_DIR).is_dir() => path.to_path_buf(), |
| 398 | Some(path) => find_repository_root_from(path)?, |
| 399 | None => find_repository_root()?, |
| 400 | }; |
| 401 | Repository::open_readonly(&repo_path).map_err(CliError::from) |
| 402 | } |
| 403 | |
| 404 | /// Acquire a read-only repository for a CLI query, allowing short-lived writers |
| 405 | /// (such as Stop checkpoint publication) to finish first. Only typed database |
no test coverage detected