Open the service session for the ambient repository. Returns `None` outside a repository — the caller falls through to its own (proper) not-a-repository error path.
()
| 121 | /// `None` outside a repository — the caller falls through to its own |
| 122 | /// (proper) not-a-repository error path. |
| 123 | pub fn open() -> CliResult<Option<Service>> { |
| 124 | let Ok(root) = crate::commands::find_repository_root() else { |
| 125 | return Ok(None); |
| 126 | }; |
| 127 | Self::open_root(&root) |
| 128 | } |
| 129 | |
| 130 | /// Open a session for administering the repository at the ambient |
| 131 | /// path — `atomic sandbox open/renew/close`. Refused inside a remote |