Skip to content

Convert all CRLF to LF#427

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/convert-crlf-to-lf
Draft

Convert all CRLF to LF#427
Copilot wants to merge 3 commits intomainfrom
copilot/convert-crlf-to-lf

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 26, 2026

Several text files in the repo contained CRLF line endings, inconsistent with the LF-only policy enforced via .gitattributes.

Changes

  • ASCII text files — stripped \r from SUPPORT.md and .azuredevops/dependabot.yml
  • UTF-16 LE JSON testdata files — removed the UTF-16 LE CRLF sequence from buildmodel/publishmanifest/testdata/msGo.output.manifest.json; this required binary-level patching since sed only handles byte-oriented encodings
  • buildmodel/buildassets manifest testdata preserved as-isbuildmodel/buildassets/testdata/*/msGo.output.manifest.json files are kept in their original UTF-16 LE CRLF format because they represent real-world pipeline output that the parser must handle in production
  • Binary files left unchanged — PNG images and patch/testdata/moremath.pack (git bundle) contain legitimate \r bytes and are not text files

Safeguards for buildmodel/buildassets testdata

  • Added buildmodel/buildassets/testdata/.gitattributes marking */msGo.output.manifest.json as -text (binary) so git will never normalize their line endings
  • Added a checkManifestIsUTF16LECRLF check inside TestBuildResultsDirectoryInfo_GoldenCreateSummary that fails with a clear message if the UTF-16 LE BOM or CRLF sequences are ever stripped from these files

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: dagood <12819531+dagood@users.noreply.github.com>
Copilot AI changed the title [WIP] Convert all CRLF line endings to LF Convert all CRLF to LF Feb 26, 2026
@dagood
Copy link
Copy Markdown
Member

dagood commented Mar 23, 2026

@copilot it's important that msGo.output.manifest.json keep UTF-16 LE CRLF sequences. This is what this program has to parse in the wild, so it's important to test it. Revert these files to their old state and add a .gitattributes to buildmodel/buildassets that explains this.

Also, add a check to TestBuildResultsDirectoryInfo_GoldenCreateSummary that ensures the test data is in this format, so this change won't be made accidentally in the future.

…butes and format check

Co-authored-by: dagood <12819531+dagood@users.noreply.github.com>
Agent-Logs-Url: https://github.com/microsoft/go-infra/sessions/b36ba2ad-18c0-4823-acb2-7811d233e85c
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 23, 2026

@copilot it's important that msGo.output.manifest.json keep UTF-16 LE CRLF sequences. This is what this program has to parse in the wild, so it's important to test it. Revert these f...

Done in fc7378d:

  • Reverted buildmodel/buildassets/testdata/1.23dev-publish/msGo.output.manifest.json and 1.23dev-missing-publish/msGo.output.manifest.json to their original UTF-16 LE CRLF format.
  • Added buildmodel/buildassets/testdata/.gitattributes marking */msGo.output.manifest.json as -text (binary) so git won't normalize their line endings.
  • Added checkManifestIsUTF16LECRLF helper in TestBuildResultsDirectoryInfo_GoldenCreateSummary that fails with a clear restore-from-source-control message if the BOM or CRLF sequences are missing.

Copilot AI requested a review from dagood March 23, 2026 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants