FA-75528 / Text diff and three-way merge / Member archive
Diffstat histogram: each bar is scaled to its own file total · case 03
Every changed file fills the whole width, so bars no longer compare sizes.
Case contract
Files are [path, added, removed], with None counts for binary files. Each text file prints "path | total +++---"; when the largest total exceeds width, both counts scale by width/max with floor, but a non-zero count keeps at least one mark. Binary files print "path | Bin". The summary counts files and, when non-zero, insertions and deletions with singular/plural wording.
Why this case matters
Diffstat output is how reviewers size a change; scaling and pluralization rules are easy to get subtly wrong.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| scaled bar keeps small counts visible | ["big.c | 200 ++++++++++++++++++++", "tiny.c | 2 ++++++++++----------", "2 files changed, 201 insertions(+), 1 deletion(-)"] | ["big.c | 200 ++++++++++++++++++++", "tiny.c | 2 +-", "2 files changed, 201 insertions(+), 1 deletion(-)"] | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗