Commit b1ff62a
fix(repo): stop git corrupting binaries, and drop 7 dead PNGs it already ate (#2433)
`.gitattributes` was one line, `* text=auto`, with no binary rules. So git
treated `.png` as text and rewrote every `0D 0A` inside it to `0A` on commit. A
PNG opens `89 50 4E 47 0D 0A 1A 0A`; the tracked ones open
`89 50 4E 47 0A 1A 0A 00`. 14 were committed already broken in 2024 and stayed
that way for over a year, until the frontend build started reading them and
`ts-images` refused - correctly, they are not PNGs any more.
87 tracked files match the extensions now marked binary, and every one of them
was exposed to this. That rule has to land before anything is re-added, or the
same normalisation eats the replacement on commit.
The damage cannot be undone: only `0D` bytes that preceded `0A` were dropped,
so nothing records which surviving `0A` used to have one. Of the 14, seven are
referenced by nothing at all - `git grep` finds no use of
`public/images/screenshots/*.png` in any template, script, doc or style - so
they are deleted rather than carried as debt.
The other seven ARE referenced (`Testimonials.stx` uses the five avatars, the
Vue and web examples use the favicons) and need their originals re-added, which
this repository cannot supply: the only commit that ever touched them,
`970bd55b92`, already carried the damage.
`tracked-images-are-valid.test.ts` checks magic bytes on every tracked image -
34 today, 27 valid. The seven are listed as known-corrupt, and a second test
fails if any of them turns out to be VALID, so repairing one forces its removal
from the list instead of leaving a permanent exemption. Verified both ways: a
newly added broken PNG is named, and so is a knownCorrupt file given a good
header.
Refs #2433
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent 38ac01a commit b1ff62a
9 files changed
Lines changed: 128 additions & 0 deletions
File tree
- public/images/screenshots
- storage/framework/core/buddy/tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Lines changed: 94 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
0 commit comments