From 4b3d854b125fcb69212d63d41fef273b747fffbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Jare=C5=A1?= Date: Sat, 5 Sep 2026 11:41:20 +0200 Subject: [PATCH] Check out YAML with LF so Dependabot stops rewriting every line MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The global rule is `* text=auto eol=crlf`: the repository stores LF, the working tree gets CRLF. Dependabot checks out the working-tree form, edits it, and commits those bytes without re-normalizing, so its blobs come back CRLF against our LF and every line reads as changed. Both Dependabot pull requests we have ever had look like this. #2986 was 328 changed lines where 11 were real, #3027 is a whole-file diff where 4 are real. There is no Dependabot setting for line endings, and `text eol=crlf` cannot store CRLF anyway, `text` always normalizes to LF on the way in. `eol=lf` for YAML makes the checkout and the stored form agree. No blob changes, they are already LF, and none of the 11 YAML files are PowerShell or test fixtures. pester/vscode-adapter and PowerShell/PSScriptAnalyzer already use eol=lf repo-wide. Verified with `git ls-files --eol`: after a fresh checkout the workflow files are i/lf w/lf, and `git add --renormalize .` touches nothing. 🤖 --- .gitattributes | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitattributes b/.gitattributes index 8ce1807bc..a240720b3 100644 --- a/.gitattributes +++ b/.gitattributes @@ -9,5 +9,11 @@ *.xsd text *.dtd text *.sh text eol=lf +# Dependabot edits the workflow files and commits the working-tree form without +# re-normalizing. Under the global eol=crlf that meant it committed CRLF while the +# repository stores LF, so every one of its pull requests showed every line as +# changed. LF here makes the two agree. No blob changes, they are already LF. +*.yml text eol=lf +*.yaml text eol=lf *.dll binary *.PNG binary