Skip to content

fix(docs/.gitattributes): comment accuracy on EOL policy#353

Merged
Chris-Wolfgang merged 1 commit into
mainfrom
fix/readme-formatting-and-gitattributes-comment-accuracy
May 10, 2026
Merged

fix(docs/.gitattributes): comment accuracy on EOL policy#353
Chris-Wolfgang merged 1 commit into
mainfrom
fix/readme-formatting-and-gitattributes-comment-accuracy

Conversation

@Chris-Wolfgang

Copy link
Copy Markdown
Owner

Summary

Two doc/comment inaccuracies caught by Copilot review on Try-Pattern PR #110 (comprehensive sync from canonical).

Changes

docs/README-FORMATTING.md

The example said .gitattributes "forces CRLF on *.ps1" — but the current policy (established in #347/#348) is the opposite: *.ps1 text eol=lf. Reworded to say all text files are LF, with a brief note that *.ps1 historically used CRLF before the switch.

.gitattributes

The *.ps1 comment said:

Git's autocrlf still gives Windows users CRLF in their working tree if desired without forcing CRLF into the index.

This is wrong — the explicit eol=lf on the following line overrides core.autocrlf entirely. Users get LF in both the index AND the working tree regardless of their autocrlf setting. Reworded to state that explicitly.

Note about the protected-files guard

This PR touches .gitattributes (a protected file). The Detect .NET Projects guard will block — maintainer override required.

Cascade

After this lands, future downstream sync PRs pulling these files won't reintroduce the misleading text.

Two doc/comment inaccuracies caught by Copilot review on Try-Pattern
PR #110 (the comprehensive sync from canonical):

1. docs/README-FORMATTING.md: the example said .gitattributes 'forces
   CRLF on *.ps1' which is the OPPOSITE of the current policy
   (PR #347/#348 established LF for *.ps1 with explicit eol=lf).
   Reworded to say all text files are LF, with a brief note that
   *.ps1 historically used CRLF before the switch.

2. .gitattributes: the *.ps1 comment said 'Git's autocrlf still gives
   Windows users CRLF in their working tree if desired without forcing
   CRLF into the index'. This is wrong — the explicit 'eol=lf' on the
   following line overrides core.autocrlf entirely; users get LF in
   both the index AND the working tree regardless of autocrlf setting.
   Reworded to state that explicitly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 10, 2026 03:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates documentation and inline comments to accurately reflect the repository’s current line-ending policy (LF for all text files, including *.ps1) and clarifies how .gitattributes interacts with core.autocrlf.

Changes:

  • Corrected docs/README-FORMATTING.md to state that .gitattributes enforces LF for all text files (including PowerShell scripts), and noted the historical CRLF policy for *.ps1.
  • Reworded the *.ps1 comment in .gitattributes to accurately state that eol=lf overrides core.autocrlf on checkout (LF in working tree as well as normalized LF in the index).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
docs/README-FORMATTING.md Fixes formatting documentation to match the repo’s LF-only EOL policy (including *.ps1).
.gitattributes Clarifies the *.ps1 EOL behavior and the precedence over core.autocrlf.

@Chris-Wolfgang Chris-Wolfgang merged commit a81cc20 into main May 10, 2026
11 checks passed
@Chris-Wolfgang Chris-Wolfgang deleted the fix/readme-formatting-and-gitattributes-comment-accuracy branch May 10, 2026 03:20
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