Home

xmn / bettertrumpet

publicxammen/BetterTrumpet· sync paused
Overview Code History Branches Pull requestsIssuesInsights
master
HomeOverview Code PRsIssues

fix(git): stop the CRLF filter from corrupting tracked binaries

last month

d6f6cc8
Authored
hiyochi8/23/2026, 6:59:39 PM
.gitattributes declared `* text eol=crlf` unconditionally, and `.exe`,
`.dll` and `.nupkg` were missing from the `binary` exclusion list, so git
ran its CRLF filters over every tracked binary:

- `git add` cleaned CRLF -> LF, stripping CR bytes from the stored blob.
  All 351 tracked PE files in HEAD are invalid as a result: their DOS stub
  reads `mode.\r\n$` instead of `mode.\r\r\n$`, so the e_lfanew offset at
  0x3C no longer points at the `PE\0\0` signature.
- checkout smudged LF -> CRLF, inflating nuget.exe from 8,265,462 bytes to
  8,417,871 on disk.
- the round trip is lossy, which is why `git status` reported nuget.exe as
  permanently modified straight after a clone.

Use `text=auto` so git's own binary detection can bail out, and list the
Windows/.NET binary extensions explicitly as a backstop. Re-add nuget.exe
(7.9.0.83, from dist.nuget.org) now that it stores byte-exact.

The binaries under dist/ and chocolatey/ are still the corrupted blobs;
they have to be rebuilt or re-downloaded, which this commit does not do.

Parent8c96464

3 files changed
  • .gitattributes+12−2
  • AGENTS.md+1−1
  • nuget.exe——