MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / switch

Function switch

atomic-cli/src/commands/git/shim.rs:1432–1442  ·  view source on GitHub ↗
(target: &str)

Source from the content-addressed store, hash-verified

1430}
1431
1432fn switch(target: &str) -> CliResult<()> {
1433 let root = find_repository_root()?;
1434 // The transaction brackets the FileWatcher with atomic-bridge enter/leave,
1435 // including failure cleanup; shim-originated writes inside the span are
1436 // self-suppressed so they never feed back into reconciliation.
1437 bracket_bridge_transaction(
1438 watcher_config(&root),
1439 &format!("shim-switch:{target}"),
1440 || switch_transaction(&root, target),
1441 )
1442}
1443
1444#[tracing::instrument(name = "switch", skip_all, fields(view = target))]
1445fn switch_transaction(root: &Path, target: &str) -> CliResult<()> {

Callers 1

runMethod · 0.85

Calls 4

find_repository_rootFunction · 0.85
watcher_configFunction · 0.85
switch_transactionFunction · 0.85

Tested by

no test coverage detected