| 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(); |