Skip to content

chore: update git attributes#8

Merged
nikcio merged 1 commit intomainfrom
feature/update-git-attributes
Mar 4, 2026
Merged

chore: update git attributes#8
nikcio merged 1 commit intomainfrom
feature/update-git-attributes

Conversation

@nikcio
Copy link
Contributor

@nikcio nikcio commented Mar 4, 2026

No description provided.

Copilot AI review requested due to automatic review settings March 4, 2026 19:37
@nikcio nikcio enabled auto-merge March 4, 2026 19:37
@nikcio nikcio merged commit 518506f into main Mar 4, 2026
6 checks passed
@nikcio nikcio deleted the feature/update-git-attributes branch March 4, 2026 19:38
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates .gitattributes to enforce LF line endings for a broader set of text-based source/config/documentation files and clarifies SVG handling as text.

Changes:

  • Add eol=lf to many source/config/doc file patterns (C#, web assets, markdown, templates, configs).
  • Treat .svg as text with LF line endings (instead of the prior commented guidance).
  • Remove -diff from *.lock / lockfile patterns (making them diffable again).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +5 to +7
*.cs text eol=lf diff=csharp
*.cshtml text eol=lf diff=html
*.csx text eol=lf diff=csharp
Copy link

Copilot AI Mar 4, 2026

Choose a reason for hiding this comment

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

The repo’s .editorconfig sets end_of_line = crlf for [*], but this change forces eol=lf for C# source files. That mismatch can cause perpetual line-ending churn (editors write CRLF, git normalizes to LF) and noisy diffs. Consider aligning one source of truth: either remove eol=lf here (let editorconfig decide), or update .editorconfig with matching end_of_line = lf overrides for these patterns (or globally).

Suggested change
*.cs text eol=lf diff=csharp
*.cshtml text eol=lf diff=html
*.csx text eol=lf diff=csharp
*.cs text diff=csharp
*.cshtml text diff=html
*.csx text diff=csharp

Copilot uses AI. Check for mistakes.
Comment on lines +111 to +114
*.lock text
package.json text eol=lf
package-lock.json text eol=lf -diff
pnpm-lock.yaml text eol=lf -diff
.prettierrc text
*.toml text
*.yaml text
*.yml text
browserslist text
Makefile text
makefile text
package-lock.json text eol=lf
pnpm-lock.yaml text eol=lf
Copy link

Copilot AI Mar 4, 2026

Choose a reason for hiding this comment

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

This re-enables diffs for *.lock files (previously -diff). Lockfiles are often large and auto-generated, so showing full diffs can make PRs hard to review and slow down tooling. If the goal is only line-ending normalization, keep -diff while adding the desired eol (e.g., text eol=lf -diff) for lockfile patterns.

Copilot uses AI. Check for mistakes.
Comment on lines +107 to +110
.env text eol=lf
.gitattributes text eol=lf
.gitconfig text eol=lf
.htaccess text eol=lf
Copy link

Copilot AI Mar 4, 2026

Choose a reason for hiding this comment

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

These config patterns are now forced to eol=lf, but .editorconfig currently enforces end_of_line = crlf for [*]. That conflict can cause frequent line-ending reformatting (especially for .env / .htaccess which are often edited directly) and noisy diffs. Either add matching .editorconfig overrides for these files or avoid pinning eol here.

Suggested change
.env text eol=lf
.gitattributes text eol=lf
.gitconfig text eol=lf
.htaccess text eol=lf
.env text
.gitattributes text eol=lf
.gitconfig text eol=lf
.htaccess text

Copilot uses AI. Check for mistakes.
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