Skip to content

diff: bound the report so a large comparison stays readable - #210

Merged
samoht merged 4 commits into
mainfrom
diff-report-shaping
Jul 29, 2026
Merged

diff: bound the report so a large comparison stays readable#210
samoht merged 4 commits into
mainfrom
diff-report-shaping

Conversation

@samoht

@samoht samoht commented Jul 29, 2026

Copy link
Copy Markdown
Owner

cascade diff printed every level of the difference tree and trailed the parse warnings, so on a whole-stylesheet comparison the shape of the change was only reachable by grepping the tree connectors out of a few thousand lines. The report is now bounded: the tree prints in full while it stays short and otherwise falls back to the deepest level that fits, --depth pins a level or asks for all of them, warnings lead because they qualify every difference under them, and each elision keeps a visible count so a cut subtree never reads as an empty one.

Two smaller fixes land first: f794eb0 pluralises the container count in the change summary, and 17aadf0 reports conditional blocks that only moved as a shift run rather than listing every renumbered block twice.

samoht added 3 commits July 28, 2026 21:43
A whole-stylesheet diff printed every level of the tree and trailed the
parse warnings, so the shape of the change was only reachable by grepping
the top-level connectors out of a few thousand lines. Warnings qualify
every difference under them, so they lead; both sections are bounded, with
the elided counts kept visible so a cut subtree never reads as an empty
one.
Merging two same-condition blocks renumbers every block after them, and
the raw listing printed each of those twice, once per side, so a single
merge read as a wholesale rewrite of the container. Pairing the two sides
by selector signature separates the blocks that actually changed from the
ones that only moved.
@samoht
samoht force-pushed the diff-report-shaping branch from 1e1ac4f to 3a7464e Compare July 29, 2026 04:46
@samoht
samoht merged commit d99d67c into main Jul 29, 2026
5 checks passed
@samoht
samoht deleted the diff-report-shaping branch July 29, 2026 05:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant