fn collect_snapshot_entries( root: &Path, dir: &Path, entries: &mut Vec<ReferenceSnapshotEntry>, ) -> Result<()>