You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Every build rewrites .gitattributes and deletes the patch-*.txt -text rule protecting the CRLF patch fixtures #132
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.
Priority: Medium. Every build dirties .gitattributes, so the rule protecting patch-crlf.txt is easy to commit away by accident. After that, the CR-preservation parser test can quietly stop testing what it was written for. Nothing is broken yet, but the working tree is never clean after a build.
Area / suggested assignee: repository layout (.gitattributes, GitIntegration.Test/Fixtures/). The trigger is _KtsuSyncStyleConfigFiles in ktsu.Sdk's Sdk.targets. Owner: @matt-edmondson
Duplicates / in progress: not a duplicate. No open PR.
Next step: move the rule into GitIntegration.Test/Fixtures/.gitattributes as the issue proposes. Separately, the SDK overwrites any repository-specific root attributes in every consuming repo without warning. That may deserve its own issue in ktsu-dev/Sdk, so other repos don't hit the same problem.
Activity
matt-edmondson commentedon Sep 27, 2026
Triage
.gitattributes, so the rule protectingpatch-crlf.txtis easy to commit away by accident. After that, the CR-preservation parser test can quietly stop testing what it was written for. Nothing is broken yet, but the working tree is never clean after a build..gitattributes,GitIntegration.Test/Fixtures/). The trigger is_KtsuSyncStyleConfigFilesin ktsu.Sdk'sSdk.targets. Owner: @matt-edmondsonGitIntegration.Test/Fixtures/.gitattributesas the issue proposes. Separately, the SDK overwrites any repository-specific root attributes in every consuming repo without warning. That may deserve its own issue in ktsu-dev/Sdk, so other repos don't hit the same problem.Generated by Claude Code