Skip to content

[Repo Assist] chore: add line-ending normalisation to .gitattributes#126

Draft
github-actions[bot] wants to merge 1 commit intomasterfrom
repo-assist/eng-gitattributes-2026-04-03-d8a93fc690060e84
Draft

[Repo Assist] chore: add line-ending normalisation to .gitattributes#126
github-actions[bot] wants to merge 1 commit intomasterfrom
repo-assist/eng-gitattributes-2026-04-03-d8a93fc690060e84

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions bot commented Apr 3, 2026

🤖 This is an automated draft PR from Repo Assist, an AI assistant.

Summary

Adds * text=auto eol=lf to .gitattributes so Git normalises all text files to LF in the repository. This prevents mixed-line-ending noise in diffs when contributors work across Windows, macOS, and Linux.

Why

The current .gitattributes only contains a single line managing the Repo Assist lock file. It provides no line-ending policy. Without one:

  • A Windows contributor who checks out without core.autocrlf=input will commit CRLF line endings, producing large noisy diffs
  • Once CRLF sneaks into the repo, every subsequent tool that reads the file may behave differently

PR #85 (already open) adds .editorconfig with end_of_line = lf, which handles editor-level behaviour. .gitattributes enforces the same rule at the git layer, so it takes effect regardless of editor or local git configuration.

Changes

File Change
.gitattributes Add * text=auto eol=lf (normalise text files to LF); *.bat text eol=crlf (keep Windows scripts as CRLF); mark png/gif/ico as binary

The existing Repo Assist lock-file rule is preserved unchanged.

No Runtime Impact

.gitattributes affects only git's checkout/commit behaviour — zero impact on the extension, tests, or build.

Test Status

node --test test/unit.test.js — 7/7 unit tests pass (no code changes).

Generated by Repo Assist ·

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@346204513ecfa08b81566450d7d599556807389f

Add `* text=auto eol=lf` to normalise all text files to LF in the
repository, preventing mixed-line-ending noise in diffs when contributors
use Windows alongside macOS/Linux.

Also explicitly mark .bat files as CRLF and binary assets (png/gif/ico)
as binary so they are never touched.

The existing Repo Assist lock-file rule is retained unchanged.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants