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

Function write_aligned_checkpoint

atomic-cli/src/commands/git/shadow.rs:2476–2490  ·  view source on GitHub ↗
(root: &Path, git: &GitRepository)

Source from the content-addressed store, hash-verified

2474 }
2475
2476 fn write_aligned_checkpoint(root: &Path, git: &GitRepository) {
2477 let head = git.head().unwrap().target().unwrap();
2478 let tree = git.find_commit(head).unwrap().tree_id();
2479 let atomic = crate::commands::git::checkpoint::observe_current_atomic(root).unwrap();
2480 crate::commands::git::checkpoint::write_verified_checkpoint(
2481 root,
2482 crate::commands::git::checkpoint::VerifiedCheckpointInput {
2483 view: &atomic.view,
2484 atomic_state: &atomic.state,
2485 git_head: &head.to_string(),
2486 git_tree: &tree.to_string(),
2487 },
2488 )
2489 .unwrap();
2490 }
2491
2492 fn current_view(root: &Path) -> String {
2493 let repo = atomic_repository::Repository::open_readonly(root).unwrap();

Calls 4

observe_current_atomicFunction · 0.85
unwrapMethod · 0.45
headMethod · 0.45