diff --git a/.gitattributes b/.gitattributes index 2bfd4bf9f9b..0fad740d301 100644 --- a/.gitattributes +++ b/.gitattributes @@ -22,31 +22,31 @@ Lib/test/sndhdrdata/sndhdr.* binary PC/classicAppCompat.* binary # Text files that should not be subject to eol conversion -[attr]noeol -text - -Lib/test/cjkencodings/* noeol -Lib/test/tokenizedata/coding20731.py noeol -Lib/test/decimaltestdata/*.decTest noeol -Lib/test/test_email/data/*.txt noeol -Lib/test/test_importlib/resources/data01/* noeol -Lib/test/test_importlib/resources/namespacedata01/* noeol -Lib/test/xmltestdata/* noeol +# START META PATCH (manually expand gitattributes macros due to ShipIt limitations) +Lib/test/cjkencodings/* -text +Lib/test/tokenizedata/coding20731.py -text +Lib/test/decimaltestdata/*.decTest -text +Lib/test/test_email/data/*.txt -text +Lib/test/test_importlib/resources/data01/* -text +Lib/test/test_importlib/resources/namespacedata01/* -text +Lib/test/xmltestdata/* -text +# END META PATCH # Shell scripts should have LF even on Windows because of Cygwin Lib/venv/scripts/common/activate text eol=lf Lib/venv/scripts/posix/* text eol=lf # CRLF files -[attr]dos text eol=crlf - -*.bat dos -*.proj dos -*.props dos -*.ps1 dos -*.sln dos -*.vcxproj* dos -PC/readme.txt dos -PCbuild/readme.txt dos +# START META PATCH (manually expand gitattributes macros due to ShipIt limitations) +*.bat text eol=crlf +*.proj text eol=crlf +*.props text eol=crlf +*.ps1 text eol=crlf +*.sln text eol=crlf +*.vcxproj* text eol=crlf +PC/readme.txt text eol=crlf +PCbuild/readme.txt text eol=crlf +# END META PATCH # Language aware diff headers # https://tekin.co.uk/2020/10/better-git-diff-output-for-ruby-python-elixir-and-more @@ -64,31 +64,31 @@ PCbuild/readme.txt dos # To always hide generated files in local diffs, mark them as binary: # $ git config diff.generated.binary true # -[attr]generated linguist-generated=true diff=generated - -**/clinic/*.c.h generated -*_db.h generated -Doc/data/stable_abi.dat generated -Doc/library/token-list.inc generated -Include/internal/pycore_ast.h generated -Include/internal/pycore_ast_state.h generated -Include/internal/pycore_opcode.h generated -Include/internal/pycore_*_generated.h generated -Include/opcode.h generated -Include/token.h generated -Lib/keyword.py generated -Lib/test/levenshtein_examples.json generated -Lib/test/test_stable_abi_ctypes.py generated -Lib/token.py generated -Objects/typeslots.inc generated -PC/python3dll.c generated -Parser/parser.c generated -Parser/token.c generated -Programs/test_frozenmain.h generated -Python/Python-ast.c generated -Python/generated_cases.c.h generated -Python/opcode_targets.h generated -Python/stdlib_module_names.h generated -Tools/peg_generator/pegen/grammar_parser.py generated -aclocal.m4 generated -configure generated +# START META PATCH (manually expand gitattributes macros due to ShipIt limitations) +**/clinic/*.c.h linguist-generated=true diff=generated +*_db.h linguist-generated=true diff=generated +Doc/data/stable_abi.dat linguist-generated=true diff=generated +Doc/library/token-list.inc linguist-generated=true diff=generated +Include/internal/pycore_ast.h linguist-generated=true diff=generated +Include/internal/pycore_ast_state.h linguist-generated=true diff=generated +Include/internal/pycore_opcode.h linguist-generated=true diff=generated +Include/internal/pycore_*_generated.h linguist-generated=true diff=generated +Include/opcode.h linguist-generated=true diff=generated +Include/token.h linguist-generated=true diff=generated +Lib/keyword.py linguist-generated=true diff=generated +Lib/test/levenshtein_examples.json linguist-generated=true diff=generated +Lib/test/test_stable_abi_ctypes.py linguist-generated=true diff=generated +Lib/token.py linguist-generated=true diff=generated +Objects/typeslots.inc linguist-generated=true diff=generated +PC/python3dll.c linguist-generated=true diff=generated +Parser/parser.c linguist-generated=true diff=generated +Parser/token.c linguist-generated=true diff=generated +Programs/test_frozenmain.h linguist-generated=true diff=generated +Python/Python-ast.c linguist-generated=true diff=generated +Python/generated_cases.c.h linguist-generated=true diff=generated +Python/opcode_targets.h linguist-generated=true diff=generated +Python/stdlib_module_names.h linguist-generated=true diff=generated +Tools/peg_generator/pegen/grammar_parser.py linguist-generated=true diff=generated +aclocal.m4 linguist-generated=true diff=generated +configure linguist-generated=true diff=generated +# END META PATCH