Skip to content

Normalize line endings to LF - #293

Merged
jharlow-intel merged 2 commits into
mainfrom
normalize-line-endings
Nov 9, 2026
Merged

jharlow-intel merged 2 commits into
mainfrom
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_umath/_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.

@jharlow-intel jharlow-intel 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.

Thanks, looks good.

@jharlow-intel
jharlow-intel merged commit b351c24 into main Nov 9, 2026
107 of 114 checks passed
@jharlow-intel
jharlow-intel deleted the normalize-line-endings branch November 9, 2026 17:17
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