-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
[windows] bpo-27425: Be more explicit in .gitattributes #840
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+2,379
−2,346
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,41 @@ | ||
| # 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 | ||
| Lib/test/cjkencodings/* binary | ||
| Lib/test/decimaltestdata/*.decTest binary | ||
| *.png binary | ||
| *.psd binary | ||
| *.tar binary | ||
| *.wav binary | ||
| *.whl binary | ||
| *.zip binary | ||
|
|
||
| # Specific binary files | ||
| Lib/test/sndhdrdata/sndhdr.* binary | ||
| Lib/test/test_email/data/msg_26.txt binary | ||
| Lib/test/xmltestdata/* binary | ||
| Lib/venv/scripts/nt/* binary | ||
| Lib/test/coding20731.py 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 | ||
|
|
||
| # Special files in third party code | ||
| Modules/zlib/zlib.map -text | ||
|
|
||
| # CRLF files | ||
| *.bat text eol=crlf | ||
| *.ps1 text eol=crlf | ||
| *.sln text eol=crlf | ||
| *.vcxproj* text eol=crlf | ||
| *.props text eol=crlf | ||
| *.proj text eol=crlf | ||
| PCbuild/readme.txt text eol=crlf | ||
| PC/readme.txt text eol=crlf | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,51 +1,51 @@ | ||
| function global:deactivate ([switch]$NonDestructive) { | ||
| # Revert to original values | ||
| if (Test-Path function:_OLD_VIRTUAL_PROMPT) { | ||
| copy-item function:_OLD_VIRTUAL_PROMPT function:prompt | ||
| remove-item function:_OLD_VIRTUAL_PROMPT | ||
| } | ||
| if (Test-Path env:_OLD_VIRTUAL_PYTHONHOME) { | ||
| copy-item env:_OLD_VIRTUAL_PYTHONHOME env:PYTHONHOME | ||
| remove-item env:_OLD_VIRTUAL_PYTHONHOME | ||
| } | ||
| if (Test-Path env:_OLD_VIRTUAL_PATH) { | ||
| copy-item env:_OLD_VIRTUAL_PATH env:PATH | ||
| remove-item env:_OLD_VIRTUAL_PATH | ||
| } | ||
| if (Test-Path env:VIRTUAL_ENV) { | ||
| remove-item env:VIRTUAL_ENV | ||
| } | ||
| if (!$NonDestructive) { | ||
| # Self destruct! | ||
| remove-item function:deactivate | ||
| } | ||
| } | ||
| deactivate -nondestructive | ||
| $env:VIRTUAL_ENV="__VENV_DIR__" | ||
| if (! $env:VIRTUAL_ENV_DISABLE_PROMPT) { | ||
| # Set the prompt to include the env name | ||
| # Make sure _OLD_VIRTUAL_PROMPT is global | ||
| function global:_OLD_VIRTUAL_PROMPT {""} | ||
| copy-item function:prompt function:_OLD_VIRTUAL_PROMPT | ||
| function global:prompt { | ||
| Write-Host -NoNewline -ForegroundColor Green '__VENV_PROMPT__' | ||
| _OLD_VIRTUAL_PROMPT | ||
| } | ||
| } | ||
| # Clear PYTHONHOME | ||
| if (Test-Path env:PYTHONHOME) { | ||
| copy-item env:PYTHONHOME env:_OLD_VIRTUAL_PYTHONHOME | ||
| remove-item env:PYTHONHOME | ||
| } | ||
| # Add the venv to the PATH | ||
| copy-item env:PATH env:_OLD_VIRTUAL_PATH | ||
| $env:PATH = "$env:VIRTUAL_ENV\__VENV_BIN_NAME__;$env:PATH" | ||
| function global:deactivate ([switch]$NonDestructive) { | ||
| # Revert to original values | ||
| if (Test-Path function:_OLD_VIRTUAL_PROMPT) { | ||
| copy-item function:_OLD_VIRTUAL_PROMPT function:prompt | ||
| remove-item function:_OLD_VIRTUAL_PROMPT | ||
| } | ||
|
|
||
| if (Test-Path env:_OLD_VIRTUAL_PYTHONHOME) { | ||
| copy-item env:_OLD_VIRTUAL_PYTHONHOME env:PYTHONHOME | ||
| remove-item env:_OLD_VIRTUAL_PYTHONHOME | ||
| } | ||
|
|
||
| if (Test-Path env:_OLD_VIRTUAL_PATH) { | ||
| copy-item env:_OLD_VIRTUAL_PATH env:PATH | ||
| remove-item env:_OLD_VIRTUAL_PATH | ||
| } | ||
|
|
||
| if (Test-Path env:VIRTUAL_ENV) { | ||
| remove-item env:VIRTUAL_ENV | ||
| } | ||
|
|
||
| if (!$NonDestructive) { | ||
| # Self destruct! | ||
| remove-item function:deactivate | ||
| } | ||
| } | ||
|
|
||
| deactivate -nondestructive | ||
|
|
||
| $env:VIRTUAL_ENV="__VENV_DIR__" | ||
|
|
||
| if (! $env:VIRTUAL_ENV_DISABLE_PROMPT) { | ||
| # Set the prompt to include the env name | ||
| # Make sure _OLD_VIRTUAL_PROMPT is global | ||
| function global:_OLD_VIRTUAL_PROMPT {""} | ||
| copy-item function:prompt function:_OLD_VIRTUAL_PROMPT | ||
| function global:prompt { | ||
| Write-Host -NoNewline -ForegroundColor Green '__VENV_PROMPT__' | ||
| _OLD_VIRTUAL_PROMPT | ||
| } | ||
| } | ||
|
|
||
| # Clear PYTHONHOME | ||
| if (Test-Path env:PYTHONHOME) { | ||
| copy-item env:PYTHONHOME env:_OLD_VIRTUAL_PYTHONHOME | ||
| remove-item env:PYTHONHOME | ||
| } | ||
|
|
||
| # Add the venv to the PATH | ||
| copy-item env:PATH env:_OLD_VIRTUAL_PATH | ||
| $env:PATH = "$env:VIRTUAL_ENV\__VENV_BIN_NAME__;$env:PATH" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,32 +1,32 @@ | ||
| @echo off | ||
| set "VIRTUAL_ENV=__VENV_DIR__" | ||
| if not defined PROMPT ( | ||
| set "PROMPT=$P$G" | ||
| ) | ||
| if defined _OLD_VIRTUAL_PROMPT ( | ||
| set "PROMPT=%_OLD_VIRTUAL_PROMPT%" | ||
| ) | ||
| if defined _OLD_VIRTUAL_PYTHONHOME ( | ||
| set "PYTHONHOME=%_OLD_VIRTUAL_PYTHONHOME%" | ||
| ) | ||
| set "_OLD_VIRTUAL_PROMPT=%PROMPT%" | ||
| set "PROMPT=__VENV_PROMPT__%PROMPT%" | ||
| if defined PYTHONHOME ( | ||
| set "_OLD_VIRTUAL_PYTHONHOME=%PYTHONHOME%" | ||
| set PYTHONHOME= | ||
| ) | ||
| if defined _OLD_VIRTUAL_PATH ( | ||
| set "PATH=%_OLD_VIRTUAL_PATH%" | ||
| ) else ( | ||
| set "_OLD_VIRTUAL_PATH=%PATH%" | ||
| ) | ||
| set "PATH=%VIRTUAL_ENV%\__VENV_BIN_NAME__;%PATH%" | ||
| :END | ||
| @echo off | ||
| set "VIRTUAL_ENV=__VENV_DIR__" | ||
|
|
||
| if not defined PROMPT ( | ||
| set "PROMPT=$P$G" | ||
| ) | ||
|
|
||
| if defined _OLD_VIRTUAL_PROMPT ( | ||
| set "PROMPT=%_OLD_VIRTUAL_PROMPT%" | ||
| ) | ||
|
|
||
| if defined _OLD_VIRTUAL_PYTHONHOME ( | ||
| set "PYTHONHOME=%_OLD_VIRTUAL_PYTHONHOME%" | ||
| ) | ||
|
|
||
| set "_OLD_VIRTUAL_PROMPT=%PROMPT%" | ||
| set "PROMPT=__VENV_PROMPT__%PROMPT%" | ||
|
|
||
| if defined PYTHONHOME ( | ||
| set "_OLD_VIRTUAL_PYTHONHOME=%PYTHONHOME%" | ||
| set PYTHONHOME= | ||
| ) | ||
|
|
||
| if defined _OLD_VIRTUAL_PATH ( | ||
| set "PATH=%_OLD_VIRTUAL_PATH%" | ||
| ) else ( | ||
| set "_OLD_VIRTUAL_PATH=%PATH%" | ||
| ) | ||
|
|
||
| set "PATH=%VIRTUAL_ENV%\__VENV_BIN_NAME__;%PATH%" | ||
|
|
||
| :END |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,21 +1,21 @@ | ||
| @echo off | ||
| if defined _OLD_VIRTUAL_PROMPT ( | ||
| set "PROMPT=%_OLD_VIRTUAL_PROMPT%" | ||
| ) | ||
| set _OLD_VIRTUAL_PROMPT= | ||
| if defined _OLD_VIRTUAL_PYTHONHOME ( | ||
| set "PYTHONHOME=%_OLD_VIRTUAL_PYTHONHOME%" | ||
| set _OLD_VIRTUAL_PYTHONHOME= | ||
| ) | ||
| if defined _OLD_VIRTUAL_PATH ( | ||
| set "PATH=%_OLD_VIRTUAL_PATH%" | ||
| ) | ||
| set _OLD_VIRTUAL_PATH= | ||
| set VIRTUAL_ENV= | ||
| :END | ||
| @echo off | ||
|
|
||
| if defined _OLD_VIRTUAL_PROMPT ( | ||
| set "PROMPT=%_OLD_VIRTUAL_PROMPT%" | ||
| ) | ||
| set _OLD_VIRTUAL_PROMPT= | ||
|
|
||
| if defined _OLD_VIRTUAL_PYTHONHOME ( | ||
| set "PYTHONHOME=%_OLD_VIRTUAL_PYTHONHOME%" | ||
| set _OLD_VIRTUAL_PYTHONHOME= | ||
| ) | ||
|
|
||
| if defined _OLD_VIRTUAL_PATH ( | ||
| set "PATH=%_OLD_VIRTUAL_PATH%" | ||
| ) | ||
|
|
||
| set _OLD_VIRTUAL_PATH= | ||
|
|
||
| set VIRTUAL_ENV= | ||
|
|
||
| :END |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are text files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As best I can tell,
-textin.gitattributesjust means "don't change the end-of-line character used in this file regardless of settings like core.autocrlf or core.eol". Editing the file and runninggit diffstill results in a readable diff (preventing that is controlled by-diff, which is included in thebinarymacro).Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*.decTestfiles are read intest_decimal.pyas text files. No need to prevent changing the end-of-line character.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But they are imported from elsewhere, and it would be good to keep them the same as they were imported. @skrah may have an opinion on this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of them are imported from http://speleotrove.com/decimal/dectest.html (dectest.zip).
I agree with Zachary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should they be converted to CRLF line ending as in
decTest.zip?Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which ones? I just opened Lib/test/decimaltestdata/ddInvert.decTest and it's DOS as expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just opened the first file
abs.decTestand it has LF line ending.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, then it would be reasonable to convert all files that are also in decTest.zip to CRLF.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conversion of course not necessarily as part of this issue, unless someone has the patience to do that. ;)