Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 5e5e951

Browse files
gnpricemiss-islington
authored andcommittedSep 9, 2019
bpo-37936: Avoid ignoring files that we actually do track. (GH-15451)
There were about 14 files that are actually in the repo but that are covered by the rules in .gitignore. Git itself takes no notice of what .gitignore says about files that it's already tracking... but the discrepancy can be confusing to a human that adds a new file unexpectedly covered by these rules, as well as to non-Git software that looks at .gitignore but doesn't implement this wrinkle in its semantics. (E.g., `rg`.) Several of these are from rules that apply more broadly than intended: for example, `Makefile` applies to `Doc/Makefile` and `Tools/freeze/test/Makefile`, whereas `/Makefile` means only the `Makefile` at the repo's root. And the `Modules/Setup` rule simply wasn't updated after 961d54c. https://bugs.python.org/issue37936
1 parent e223ba1 commit 5e5e951

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed
 

‎.gitignore

+4-3
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ Include/pydtrace_probes.h
2727
Lib/distutils/command/*.pdb
2828
Lib/lib2to3/*.pickle
2929
Lib/test/data/*
30-
Makefile
30+
!Lib/test/data/README
31+
/Makefile
3132
Makefile.pre
3233
Misc/python.pc
3334
Misc/python-embed.pc
3435
Misc/python-config.sh
35-
Modules/Setup
3636
Modules/Setup.config
3737
Modules/Setup.local
3838
Modules/config.c
@@ -79,6 +79,7 @@ config.log
7979
config.status
8080
config.status.lineno
8181
core
82+
!Tools/msi/core/
8283
db_home
8384
.hg/
8485
.idea/
@@ -89,7 +90,7 @@ libpython*.dylib
8990
libpython*.dll
9091
platform
9192
pybuilddir.txt
92-
pyconfig.h
93+
/pyconfig.h
9394
python-config
9495
python-config.py
9596
python.bat
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
The :file:`.gitignore` file no longer applies to any files that are in fact
2+
tracked in the Git repository. Patch by Greg Price.

0 commit comments

Comments
 (0)
Please sign in to comment.