GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Normalize line endings of text files in the repository (#304) by BCSharp · Pull Request #531 · IronLanguages/ironpython3

Conversation

@BCSharp

@BCSharp BCSharp commented Feb 4, 2019 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Line endings for text files in the git repository normalized to LF, following rules in .gitattibutes (Issue #304).

Note that files in the working directory that were already checked out before may not be updated. If it happens, the best way to fix it is:

  • make the working directory clean (no modified file)
  • delete all files in the working directory (except .git)
  • check out again a fresh working directory.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
BCSharp added 3 commits February 3, 2019 16:24
@BCSharp
Correct line endings rule for .ps1 files (IronLanguages#304)
26909d5
@BCSharp
Fix line endings in .py files (IronLanguages#304)
f492b6f
@BCSharp
Fix line endings in .log files (IronLanguages#304)
15f0805
@dnfclas

dnfclas commented Feb 4, 2019 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

CLA assistant check
All CLA requirements met.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@slide

slide commented Feb 4, 2019

Copy link
Copy Markdown
Contributor

My only hangup on this is the file from the stdlib. If the file matches the line endings in the C Python repo, then we need to maintain the file as is.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@slozier

slozier commented Feb 4, 2019

Copy link
Copy Markdown
Contributor

@slide I checked locally and coding20731.py is CRLF when installing on Windows so it should be fine.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@slozier

slozier commented Feb 4, 2019

Copy link
Copy Markdown
Contributor

Hmm, nvm my last comment, in the CPython repo it's always CRLF. Looking at their .gitattributes:

Lib/test/cjkencodings/* -text
Lib/test/decimaltestdata/*.decTest -text
Lib/test/test_email/data/*.txt -text
Lib/test/xmltestdata/* -text
Lib/test/coding20731.py -text
Lib/test/test_importlib/data01/* -text
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@BCSharp

BCSharp commented Feb 4, 2019 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

Indeed. But in this case I think we should take over all of those .gitignore specs and make sure all affected files are checked in exactly in the same way as in CPython, do you agree? Otherwise, we may have a situation that some tests (enabled in the future) pass on one platform but fail on another. Which version of CPython does the StdLib come from?

On a side note, I see that CPython declares *.ps1 files as always CRLF; IronPython had makefile.ps1 as always LF. I have made .ps1 files auto, which makes more sense in times of portable PowerShell.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@slozier

slozier commented Feb 4, 2019

Copy link
Copy Markdown
Contributor

I agree, we should probably add Src/StdLib/.gitattributes with the same specs as CPython. The StdLib comes from CPython 3.4.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@BCSharp

BCSharp commented Feb 4, 2019

Copy link
Copy Markdown
Member Author

They added those .gitatributes fairly recently, in 3.7 and then backported all the way to 3.5 and 2.7.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@slozier

slozier commented Feb 4, 2019

Copy link
Copy Markdown
Contributor

I think something the following would do the trick:

# Binary data types
*.aif binary
*.aifc binary
*.aiff binary
*.au binary
*.bmp binary
*.exe binary
*.icns binary
*.gif binary
*.ico binary
*.jpg binary
*.pck binary
*.png binary
*.psd binary
*.tar binary
*.wav binary
*.whl binary
*.zip binary

# Specific binary files
Lib/test/sndhdrdata/sndhdr.* binary

# Text files that should not be subject to eol conversion
Lib/test/cjkencodings/* -text
Lib/test/decimaltestdata/*.decTest -text
Lib/test/test_email/data/*.txt -text
Lib/test/xmltestdata/* -text
Lib/test/coding20731.py -text

# CRLF files
*.bat text eol=crlf
*.ps1 text eol=crlf
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

BCSharp added 2 commits February 4, 2019 13:27
@BCSharp
Take over gitattributes from cpython (IronLanguages#304)
d51f872
@BCSharp
Revert "Fix line endings in .py files (IronLanguages#304)"
d8d30a5
This reverts commit f492b6f.
@BCSharp

BCSharp commented Feb 4, 2019

Copy link
Copy Markdown
Member Author

I took over those for .sln, .proj as well (although there are no such files in this location), just to prevent any surprises in the future.

slozier reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

slide
slide approved these changes Feb 4, 2019
View reviewed changes
@slozier
slozier merged commit 9aa04c1 into IronLanguages:master Feb 4, 2019
@slozier

slozier commented Feb 4, 2019

Copy link
Copy Markdown
Contributor

Thanks for the PR!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@BCSharp
BCSharp deleted the crlf_cleanup branch February 4, 2019 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@slide slide slide approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@BCSharp @dnfclas @slide @slozier
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.