Skip to content

gitattributes: strip UTF-8 BOM so the header comment parses - #29

Merged
TheWitness merged 1 commit into
mainfrom
fix/gitattributes-bom
Sep 29, 2026
Merged

TheWitness merged 1 commit into
mainfrom
fix/gitattributes-bom

Conversation

@TheWitness

Copy link
Copy Markdown
Member

Problem

Cloning this repository prints:

endings, is not a valid attribute name: .gitattributes:1

.gitattributes begins with a UTF-8 BOM (EF BB BF) in front of the # comment on line 1. Because the BOM precedes the #, Git does not recognise the line as a comment and instead parses the comment words as attributes - the token endings, (from "line endings, regardless of platform") trips the warning.

Fix

Remove the 3-byte BOM. The file content is otherwise unchanged:

# Normalize all text files to LF line endings, regardless of platform.
* text=auto eol=lf

Verified: a clone with the BOM emits the warning; after stripping it the clone is clean.

Copilot AI balanced review requested due to automatic review settings September 29, 2026 16:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The focused change correctly resolves the parsing warning without changing configuration semantics.

Review effort: Balanced
Findings: None

What changed in this PR

Removes the UTF-8 BOM so Git correctly parses the .gitattributes header comment.

Changes:

  • Strips the BOM without altering attribute behavior.
File Description
.gitattributes Removes the leading BOM from the comment.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@TheWitness
TheWitness merged commit 3c896ac into main Sep 29, 2026
6 checks passed
@TheWitness
TheWitness deleted the fix/gitattributes-bom branch September 29, 2026 17:21
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.

4 participants