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