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

Function switch

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

Source from the content-addressed store, hash-verified

1386}
1387
1388fn 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))]
1401fn 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