Skip to content

Normalize line endings to LF - #258

Merged
antonwolfy merged 5 commits into
masterfrom
normalize-line-endings
Dec 3, 2026
Merged

antonwolfy merged 5 commits into
masterfrom
normalize-line-endings

Conversation

@antonwolfy

Copy link
Copy Markdown
Collaborator

One tracked file was stored with CRLF line endings, while every other file in the repository uses LF:

  • mkl/_init_helper.py

Because the repository has no .gitattributes, git keeps whatever line endings a file was committed with, so the whole file shows as changed when it is edited with a tool that writes LF. This PR adds the .gitattributes that dpnp uses:

* text=auto eol=lf

It stores all text files with LF and checks them out with LF, .bat files included, as in dpnp. The files above are renormalized with git add --renormalize .. Their contents don't change: git diff --ignore-cr-at-eol shows only .gitattributes. The same change is proposed in IntelPython/mkl_random#203 and IntelPython/dpctl#2396.

Use the same .gitattributes as dpnp, so that text files are stored with
LF, and renormalize the files that were stored with CRLF.
Copilot AI balanced review requested due to automatic review settings December 1, 2026 12:57

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.

🟢 Approval recommended

No active review issues are reported for the line-ending standardization change.

No open issues 🎉

What changed in this PR

This PR standardizes line endings in mkl-service to prevent whole-file diffs caused by CRLF-to-LF conversion, without changing runtime behavior.

Changes:

  • Add a repository-wide LF policy for text files, including .bat files.
  • Normalize mkl/_init_helper.py from CRLF to LF without changing its code.

The root AGENTS.md was unavailable in the checkout, so further repository inspection was stopped.

File Description
mkl/​_init_helper.py Normalize line endings to LF; code remains unchanged.
.gitattributes Set * text=auto eol=lf for consistent text-file line endings.

Review effort: Balanced

@antonwolfy

Copy link
Copy Markdown
Collaborator Author

@vlad-perevezentsev vlad-perevezentsev left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM
Thank you @antonwolfy

@antonwolfy
antonwolfy merged commit 153201c into master Dec 3, 2026
141 of 142 checks passed
@antonwolfy
antonwolfy deleted the normalize-line-endings branch December 3, 2026 14:27
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