What happened
Flipping a repo's line-ending default (CRLF -> LF, or the reverse) via `git add --renormalize .` is a documented, supported operation - `.editorconfig`'s own header comment in this hub spells out the exact commands (`core.autocrlf false`, `git add --renormalize .`, `git ls-files --eol`). Doing this in `ptr727/Financial-Modeling` (flipping the repo to LF-by-default, matching the hub) makes the fleet's own `prose-gate` action unusable for the commit that does it.
Reproduction
`.github/actions/prose-gate/prose_lint.py`'s `changed_lines()` computes the diff as:
```python
["git", "-C", str(root), "diff", "--unified=0", "--no-color", base, "--"]
```
No whitespace/EOL-ignoring flag. A pure line-ending-only commit (verified byte-identical content modulo `\r\n` vs `\n` for every file, checked with `git show : | tr -d '\r' | md5sum` against `git show : | tr -d '\r' | md5sum` for all 276 renormalized files) is read by plain `git diff` as a full delete+insert of every line:
```text
$ git diff HEAD --stat -- .gitignore
.gitignore | 178 ++++++++++++++++++++++++++++++-------------------------------
1 file changed, 89 insertions(+), 89 deletions(-)
$ git diff HEAD --ignore-cr-at-eol --stat -- .gitignore
(empty - confirms it's a pure EOL change)
```
Running `scripts/prose_lint.py --diff ` against the renormalization commit therefore treats all 40,000+ changed lines across 276 files as newly-introduced and reports every pre-existing prose violation in the whole repository (1078 findings across 109 files in this case) as if the renormalization commit had introduced them, which it did not - the actual content is untouched.
Impact
Any fleet repo doing a supported, hub-documented line-ending renormalization hits this. The gate becomes impossible to pass without either fixing an unrelated backlog of pre-existing prose findings in the same commit (disproportionate scope creep for a mechanical EOL change) or bypassing the gate entirely.
Suggested fix
Add `--ignore-cr-at-eol` to the `git diff` invocation in `changed_lines()`. Verified locally that it resolves the false positives for this exact commit while still catching genuine prose changes (spot-checked against a few unrelated real content edits in the same working tree, which still show up correctly under `--ignore-cr-at-eol`).
Filed per the resync in progress - happy to help verify a fix against Financial-Modeling's tree.
What happened
Flipping a repo's line-ending default (CRLF -> LF, or the reverse) via `git add --renormalize .` is a documented, supported operation - `.editorconfig`'s own header comment in this hub spells out the exact commands (`core.autocrlf false`, `git add --renormalize .`, `git ls-files --eol`). Doing this in `ptr727/Financial-Modeling` (flipping the repo to LF-by-default, matching the hub) makes the fleet's own `prose-gate` action unusable for the commit that does it.
Reproduction
`.github/actions/prose-gate/prose_lint.py`'s `changed_lines()` computes the diff as:
```python
["git", "-C", str(root), "diff", "--unified=0", "--no-color", base, "--"]
```
No whitespace/EOL-ignoring flag. A pure line-ending-only commit (verified byte-identical content modulo `\r\n` vs `\n` for every file, checked with `git show : | tr -d '\r' | md5sum` against `git show : | tr -d '\r' | md5sum` for all 276 renormalized files) is read by plain `git diff` as a full delete+insert of every line:
```text
$ git diff HEAD --stat -- .gitignore
.gitignore | 178 ++++++++++++++++++++++++++++++-------------------------------
1 file changed, 89 insertions(+), 89 deletions(-)
$ git diff HEAD --ignore-cr-at-eol --stat -- .gitignore
(empty - confirms it's a pure EOL change)
```
Running `scripts/prose_lint.py --diff ` against the renormalization commit therefore treats all 40,000+ changed lines across 276 files as newly-introduced and reports every pre-existing prose violation in the whole repository (1078 findings across 109 files in this case) as if the renormalization commit had introduced them, which it did not - the actual content is untouched.
Impact
Any fleet repo doing a supported, hub-documented line-ending renormalization hits this. The gate becomes impossible to pass without either fixing an unrelated backlog of pre-existing prose findings in the same commit (disproportionate scope creep for a mechanical EOL change) or bypassing the gate entirely.
Suggested fix
Add `--ignore-cr-at-eol` to the `git diff` invocation in `changed_lines()`. Verified locally that it resolves the false positives for this exact commit while still catching genuine prose changes (spot-checked against a few unrelated real content edits in the same working tree, which still show up correctly under `--ignore-cr-at-eol`).
Filed per the resync in progress - happy to help verify a fix against Financial-Modeling's tree.