[Python-checkins] Update generated files list and add `diff=generated` attribute (GH-30745)

miss-islington webhook-mailer at python.org
Fri Jan 21 15:59:50 EST 2022


https://github.com/python/cpython/commit/f1e559b7544d665a84747a7bc7ecebadef2a6be2
commit: f1e559b7544d665a84747a7bc7ecebadef2a6be2
branch: main
author: Erlend Egeberg Aasland <erlend.aasland at innova.no>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2022-01-21T12:59:45-08:00
summary:

Update generated files list and add `diff=generated` attribute (GH-30745)



As a side effect, the list of generated files is relocated after the language aware diff settings.

Closes python/core-workflow#425

Automerge-Triggered-By: GH:zware

files:
M .gitattributes

diff --git a/.gitattributes b/.gitattributes
index 05b0420714e1b..2718e63e5748f 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -40,24 +40,6 @@ Lib/test/test_importlib/namespacedata01/* -text
 PCbuild/readme.txt text eol=crlf
 PC/readme.txt text eol=crlf
 
-# Generated files
-# https://github.com/github/linguist/blob/master/docs/overrides.md
-**/clinic/*.h               linguist-generated=true
-Python/deepfreeze/*.c       linguist-generated=true
-Python/frozen_modules/*.h   linguist-generated=true
-Python/frozen_modules/MANIFEST  linguist-generated=true
-Include/internal/pycore_ast.h   linguist-generated=true
-Python/Python-ast.c         linguist-generated=true
-Include/opcode.h            linguist-generated=true
-Python/opcode_targets.h     linguist-generated=true
-Objects/typeslots.inc       linguist-generated=true
-*_db.h                      linguist-generated=true
-Doc/library/token-list.inc  linguist-generated=true
-Include/token.h             linguist-generated=true
-Lib/token.py                linguist-generated=true
-Parser/token.c              linguist-generated=true
-Programs/test_frozenmain.h  linguist-generated=true
-
 # Language aware diff headers
 # https://tekin.co.uk/2020/10/better-git-diff-output-for-ruby-python-elixir-and-more
 # https://gist.github.com/tekin/12500956bd56784728e490d8cef9cb81
@@ -67,3 +49,31 @@ Programs/test_frozenmain.h  linguist-generated=true
 *.html  diff=html
 *.py    diff=python
 *.md    diff=markdown
+
+# Generated files
+# https://github.com/github/linguist/blob/master/docs/overrides.md
+#
+# 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/library/token-list.inc                   generated
+Include/internal/pycore_ast.h                generated
+Include/internal/pycore_ast_state.h          generated
+Include/opcode.h                             generated
+Include/token.h                              generated
+Lib/keyword.py                               generated
+Lib/token.py                                 generated
+Objects/typeslots.inc                        generated
+Parser/parser.c                              generated
+Parser/token.c                               generated
+Programs/test_frozenmain.h                   generated
+Python/Python-ast.c                          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



More information about the Python-checkins mailing list