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

Function write_aligned_checkpoint

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

Source from the content-addressed store, hash-verified

2286 }
2287
2288 fn write_aligned_checkpoint(root: &Path, git: &GitRepository) {
2289 let head = git.head().unwrap().target().unwrap();
2290 let tree = git.find_commit(head).unwrap().tree_id();
2291 let atomic = crate::commands::git::checkpoint::observe_current_atomic(root).unwrap();
2292 crate::commands::git::checkpoint::write_verified_checkpoint(
2293 root,
2294 crate::commands::git::checkpoint::VerifiedCheckpointInput {
2295 view: &atomic.view,
2296 atomic_state: &atomic.state,
2297 git_head: &head.to_string(),
2298 git_tree: &tree.to_string(),
2299 },
2300 )
2301 .unwrap();
2302 }
2303
2304 fn current_view(root: &Path) -> String {
2305 let repo = atomic_repository::Repository::open_readonly(root).unwrap();

Calls 4

observe_current_atomicFunction · 0.85
unwrapMethod · 0.45
headMethod · 0.45