What's wrong
Commit 50fe58b added a repository-specific rule to the root .gitattributes:
GitIntegration.Test/Fixtures/patch-*.txt -text
The rule is there because patch-crlf.txt deliberately mixes LF and CRLF line endings. Without it, the global * text=auto eol=lf would normalize that file.
ktsu.Sdk 2.25.0 has a target, _KtsuSyncStyleConfigFiles in Sdk.targets, that runs before PrepareForBuild. It copies the SDK's shared gitattributes over $(SolutionDir)/.gitattributes, and that removes the block above.
Failure scenario
- Run a plain
dotnet test.
git status now shows M .gitattributes, and the diff is exactly the deletion of that block.
- Every contributor's build dirties the tree in the same way. The first
git add -A or git commit -a commits the deletion without anyone noticing.
- From then on, any touch or renormalize of
patch-crlf.txt strips its CRs. The CR-preservation parser test then either fails, or quietly stops testing what it was written to test.
Suggested fix / acceptance criteria
- Move the exemption into a nested file,
GitIntegration.Test/Fixtures/.gitattributes, containing patch-*.txt -text, and remove the block from the root file.
- Git honours nested attribute files, and the SDK sync only touches the solution-root file, so the rule survives builds.
- Acceptance:
- After
dotnet build, git status is clean.
git check-attr text GitIntegration.Test/Fixtures/patch-crlf.txt reports unset.
What's wrong
Commit 50fe58b added a repository-specific rule to the root
.gitattributes:The rule is there because
patch-crlf.txtdeliberately mixes LF and CRLF line endings. Without it, the global* text=auto eol=lfwould normalize that file.ktsu.Sdk 2.25.0 has a target,
_KtsuSyncStyleConfigFilesinSdk.targets, that runs beforePrepareForBuild. It copies the SDK's sharedgitattributesover$(SolutionDir)/.gitattributes, and that removes the block above.Failure scenario
dotnet test.git statusnow showsM .gitattributes, and the diff is exactly the deletion of that block.git add -Aorgit commit -acommits the deletion without anyone noticing.patch-crlf.txtstrips its CRs. The CR-preservation parser test then either fails, or quietly stops testing what it was written to test.Suggested fix / acceptance criteria
GitIntegration.Test/Fixtures/.gitattributes, containingpatch-*.txt -text, and remove the block from the root file.dotnet build,git statusis clean.git check-attr text GitIntegration.Test/Fixtures/patch-crlf.txtreportsunset.