(root: &Path)
| 294 | } |
| 295 | |
| 296 | fn snapshot_worktree(root: &Path) -> BTreeMap<String, Vec<u8>> { |
| 297 | let mut snapshot = BTreeMap::new(); |
| 298 | let mut children: Vec<PathBuf> = fs::read_dir(root) |
| 299 | .expect("worktree directory") |
| 300 | .map(|entry| entry.expect("worktree entry").path()) |
| 301 | .filter(|path| { |
| 302 | !matches!( |
| 303 | path.file_name().and_then(|name| name.to_str()), |
| 304 | Some(".atomic" | ".git" | ".vault") |
| 305 | ) |
| 306 | }) |
| 307 | .collect(); |
| 308 | children.sort(); |
| 309 | for child in children { |
| 310 | collect_snapshot(root, &child, &mut snapshot); |
| 311 | } |
| 312 | snapshot |
| 313 | } |
| 314 | |
| 315 | fn latest_change(fixture: &Fixture) -> String { |
| 316 | let log: Value = serde_json::from_slice(&fixture.log_json()).expect("Atomic JSON log"); |
no test coverage detected