Skip to content

bpo-37936: Systematically distinguish rooted vs. unrooted in .gitignore. #15823

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
merged 10 commits into from
Sep 11, 2019
100 changes: 56 additions & 44 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Two-trick pony for OSX and other case insensitive file systems:
# Ignore ./python binary on Unix but still look into ./Python/ directory.
/python
!/Python/
#####
# First, rules intended to apply in all subdirectories.
# These contain no slash, or only a trailing slash.

*.cover
*.iml
Expand All @@ -18,6 +17,25 @@
*.profraw
*.dyn
.gdb_history
.purify
__pycache__
.idea/
tags
TAGS
.vs/
.vscode/
gmon.out
.mypy_cache/

# Ignore core dumps... but not Tools/msi/core/ or the like.
core
!core/


#####
# Then, rules meant for a specific location relative to the repo root.
# These must contain a non-trailing slash (and may also have a trailing slash.)

Doc/build/
Doc/venv/
Doc/.venv/
Expand All @@ -29,7 +47,7 @@ Lib/lib2to3/*.pickle
Lib/test/data/*
!Lib/test/data/README
/Makefile
Makefile.pre
/Makefile.pre
Misc/python.pc
Misc/python-embed.pc
Misc/python-config.sh
Expand Down Expand Up @@ -69,46 +87,40 @@ PCbuild/arm64/
PCbuild/obj/
PCbuild/win32/
Tools/unicode/data/
.purify
__pycache__
autom4te.cache
build/
buildno
config.cache
config.log
config.status
config.status.lineno
core
!Tools/msi/core/
db_home
.hg/
.idea/
ipch/
libpython*.a
libpython*.so*
libpython*.dylib
libpython*.dll
platform
pybuilddir.txt
/autom4te.cache
/build/
/buildno
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is an ancient leftover from before the buildno section of sys.version referred to a VCS hash; it can just go away.

/config.cache
/config.log
/config.status
/config.status.lineno
/db_home
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a holdover from the bsddb package, and can go away (so can the explicit callout of db_home in Lib/test/libregrtest/runtest.py).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, indeed!

Looks like that disappeared in b98eb87 , in the Python 3.0 period (and the bit that made a db_home directory went away just before that, in d098ff2 .)

/.hg/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can safely be ignored globally; we're not going to check in a mercurial repository anywhere :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solid prediction, I think :)

/ipch/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this was meant to be rooted at /; IIRC it's intermediate files in the Windows build rooted in PCbuild/<something>, and thus can probably just go away since those entire directories are ignored now.

/libpython*.a
/libpython*.so*
/libpython*.dylib
/libpython*.dll
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each of these 4 can be generalized to ignore anything with these extensions; we don't have anything with these extensions checked in and likely never will.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure.

/platform
/pybuilddir.txt
/pyconfig.h
python-config
python-config.py
python.bat
python.exe
python-gdb.py
python.exe-gdb.py
reflog.txt
.svn/
tags
TAGS
.coverage
coverage/
externals/
htmlcov/
/python-config
/python-config.py
/python.bat
/python.exe
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could globally ignore *.exe, with a specific exception for !Lib/distutils/command/*.exe.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, thanks!

/python-gdb.py
/python.exe-gdb.py
/reflog.txt
/.svn/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should also be globally ignored.

/.coverage
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And this.

/coverage/
/externals/
/htmlcov/
Tools/msi/obj
Tools/ssl/amd64
Tools/ssl/win32
.vs/
.vscode/
gmon.out
.mypy_cache/

# Two-trick pony for OSX and other case insensitive file systems:
# Ignore ./python binary on Unix but still look into ./Python/ directory.
/python
!/Python/
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy