Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Prevent GitHub's web conflict editor from converting LF to CRLF#148739

Merged
hugovk merged 2 commits into
python:mainpython/cpython:mainfrom
hugovk:3.15-rst-eolhugovk/cpython:3.15-rst-eolCopy head branch name to clipboard
Apr 19, 2026
Merged

Prevent GitHub's web conflict editor from converting LF to CRLF#148739
hugovk merged 2 commits into
python:mainpython/cpython:mainfrom
hugovk:3.15-rst-eolhugovk/cpython:3.15-rst-eolCopy head branch name to clipboard

Conversation

@hugovk

@hugovk hugovk commented Apr 18, 2026

Copy link
Copy Markdown
Member

I resolved a conflict in a PR using the GitHub web editor, using Chrome on macOS, which involved moving lines around. However, GitHub also changed the LF endings to CRLF:

7208828

So I had to fix it locally:

fede255

I don't know why GitHub does this. It doesn't seem to do it for simple edits, moving lines appears to be important.

A similar thing happened recently with f938f01, which only affected a few lines.

We added extra linting (#148336) to help catch stuff like this, but it only checks that the endings match the majority. That won't pick up whole file changes!

Anyway, doing some tests, GH does at least respect .gitattributes, so let's declare it.

@StanFromIreland

Copy link
Copy Markdown
Member

It seems there is a NEWS entry with CRLF endings: https://github.com/python/cpython/actions/runs/24613765518/job/71972503301?pr=148739

@hugovk

hugovk commented Apr 18, 2026

Copy link
Copy Markdown
Member Author

Converted that to LF too.

@hugovk hugovk merged commit 9e23652 into python:main Apr 19, 2026
55 checks passed
@hugovk hugovk deleted the 3.15-rst-eol branch April 19, 2026 09:21
@miss-islington-app

Copy link
Copy Markdown

Thanks @hugovk for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 19, 2026
…onGH-148739)

(cherry picked from commit 9e23652)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
@bedevere-app

bedevere-app Bot commented Apr 19, 2026

Copy link
Copy Markdown

GH-148748 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Apr 19, 2026
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 19, 2026
…onGH-148739)

(cherry picked from commit 9e23652)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
@bedevere-app

bedevere-app Bot commented Apr 19, 2026

Copy link
Copy Markdown

GH-148749 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label Apr 19, 2026
hugovk added a commit that referenced this pull request Apr 19, 2026
GH-148739) (#148749)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
hugovk added a commit that referenced this pull request Apr 19, 2026
GH-148739) (#148748)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@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.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.