Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ This is a changelog of the `dix` repository. It follows the

### Added

- The `CHANGED`, `ADDED` and `REMOVED` headings now show how many packages
they contain, e.g. `CHANGED (12)`.
- Added the `dix last [N]` subcommand, which shows the changes leading up to
the current profile generation, `dix last --all` for every generation, and
`dix last --from A --to B` for the generations numbered A to B.
Expand Down
7 changes: 6 additions & 1 deletion crates/dix/src/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,13 @@ fn render_diffs(
StatusGroup::Removed => "REMOVED",
}
.bold();
let count = diffs
.iter()
.filter(|other| status_group(other.status) == group)
.count();
let count = format!("({count})");

writeln!(writer, "{header}")?;
writeln!(writer, "{header} {count}", count = count.dim())?;
last_status_group = Some(group);
}

Expand Down
Loading