From 364b513242b0b8df877210db5102bd500cb6d070 Mon Sep 17 00:00:00 2001 From: TresPies-source Date: Fri, 23 Oct 2026 17:18:01 -0500 Subject: [PATCH] fix: pin LF line endings with a root .gitattributes A Windows clone with core.autocrlf=true checked every text file out with CRLF, so plugins/dojo-protocol/PROTOCOL.md was 2014 bytes on disk against 1987 in git. The website's gen_proof.py --check counts bytes on disk, so every /proof figure read high and the deploy guard refused the deploy unless DOJO_PLUGINS_DIR pointed at an LF export. * text=auto eol=lf, with the common text types named and binaries marked. The index was already all LF: renormalizing stages no content changes. Co-Authored-By: Claude Opus 5.5 --- .gitattributes | 33 +++++++++++++++++++++++++++++++++ CHANGELOG.md | 4 ++++ 2 files changed, 37 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..b2fb0b6 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,33 @@ +# Every text file is checked out with LF, whatever core.autocrlf says. The release publishes +# byte counts of these files (dojogenesis.com/proof, checked by the website's gen_proof.py +# --check), bash hooks need LF to run, and a CRLF checkout on Windows made every count read high. +* text=auto eol=lf + +# Named so they are always text, even where detection would guess otherwise. +*.md text eol=lf +*.py text eol=lf +*.sh text eol=lf +*.json text eol=lf +*.jsonl text eol=lf +*.js text eol=lf +*.ts text eol=lf +*.tsx text eol=lf +*.txt text eol=lf +*.yaml text eol=lf +*.yml text eol=lf + +# Binary: never converted. None are tracked today; listed so a future one is not mangled. +*.png binary +*.jpg binary +*.jpeg binary +*.gif binary +*.ico binary +*.webp binary +*.pdf binary +*.woff binary +*.woff2 binary +*.ttf binary +*.otf binary +*.zip binary +*.gz binary +*.tgz binary diff --git a/CHANGELOG.md b/CHANGELOG.md index df92246..8396394 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -67,6 +67,10 @@ method, the rubric and the tables. It started from five misfires reported from o deny. The shell parser records each substitution's parent segment so the guard can tell. - **`dojo-gates` 0.2.0, staging** — `git add -N` (intent to add) and `git add -n` (dry run) stage no content and no longer deny. +- **LF on every checkout** — a root `.gitattributes` (`* text=auto eol=lf`, with the common text types named and + binaries marked) pins line endings, so a Windows clone with `core.autocrlf=true` gets the same bytes as git + stores. Before, such a clone had CRLF files, every byte count on /proof read high, and the website's deploy guard + refused the deploy unless `DOJO_PLUGINS_DIR` pointed at an LF export. ## Unreleased — 2.3.0 — the desktop pass