| 7 | use super::ViewComparison; |
| 8 | |
| 9 | pub(in super::super) fn changed_paths(comparison: &ViewComparison) -> Vec<String> { |
| 10 | if comparison.before.state == comparison.after.state |
| 11 | && comparison.before.membership_hash == comparison.after.membership_hash |
| 12 | { |
| 13 | return vec![]; |
| 14 | } |
| 15 | let recorded_changes: BTreeSet<_> = comparison |
| 16 | .conformance |
| 17 | .changes |
| 18 | .iter() |
| 19 | .flat_map(|change| change.paths.iter()) |
| 20 | .collect(); |
| 21 | comparison |
| 22 | .files |
| 23 | .iter() |
| 24 | .filter(|file| { |
| 25 | file.status != "unchanged" |
| 26 | && (file.status != "unavailable" |
| 27 | || file |
| 28 | .before_path |
| 29 | .iter() |
| 30 | .chain(&file.after_path) |
| 31 | .any(|path| recorded_changes.contains(path))) |
| 32 | }) |
| 33 | .flat_map(|file| file.before_path.iter().chain(&file.after_path)) |
| 34 | .filter(|path| !atomic_repository::is_vault_path(path)) |
| 35 | .cloned() |
| 36 | .collect::<BTreeSet<_>>() |
| 37 | .into_iter() |
| 38 | .collect() |
| 39 | } |
| 40 | |
| 41 | pub(in super::super) fn inspect( |
| 42 | repo: &Repository, |