(target: &str)
| 1386 | } |
| 1387 | |
| 1388 | fn switch(target: &str) -> CliResult<()> { |
| 1389 | let root = find_repository_root()?; |
| 1390 | // The transaction brackets the FileWatcher with atomic-bridge enter/leave, |
| 1391 | // including failure cleanup; shim-originated writes inside the span are |
| 1392 | // self-suppressed so they never feed back into reconciliation. |
| 1393 | bracket_bridge_transaction( |
| 1394 | watcher_config(&root), |
| 1395 | &format!("shim-switch:{target}"), |
| 1396 | || switch_transaction(&root, target), |
| 1397 | ) |
| 1398 | } |
| 1399 | |
| 1400 | #[tracing::instrument(name = "switch", skip_all, fields(view = target))] |
| 1401 | fn switch_transaction(root: &Path, target: &str) -> CliResult<()> { |
no test coverage detected