diff: bound the report so a large comparison stays readable - #210
Merged
Conversation
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
force-pushed
the
diff-report-shaping
branch
from
July 29, 2026 04:46
1e1ac4f to
3a7464e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cascade diffprinted 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,--depthpins 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.