-
Notifications
You must be signed in to change notification settings - Fork 55
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
sdist.exclude should not be overridden by .gitignore #871
Comments
Slightly related: #858 |
I think that makes sense. Would you like to attempt it? |
alexreinking
added a commit
to alexreinking/scikit-build-core
that referenced
this issue
Aug 22, 2024
Previously, sdist.exclude and the built-in EXCLUDE_LINES were prepended to the list of .gitignore rules. However, a common pattern of using * to exclude everything and then using !-rules to list what should be included renders this feature useless. This commit changes the behavior of each_unignored_file to sequentially consider the following sets of independent rules: 1. Explicit inclusions 2. Explicit exclusions 3. Global exclusions from the .gitignore files 4. The built-in exclusions 5. Nested exclusions from .gitignore Fixes scikit-build#871
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
My
.gitignore
file uses the following trick to ignore (most) files without extensions:Unfortunately, the way that
sdist.exclude
is implemented is by prepending the listed rules to these. These are then overridden by the*
in the file.I believe that
sdist.exclude
should be implemented similarly tosdist.include
; in a separatepathspec
that is checked aftersdist.include
and which gets final say.The text was updated successfully, but these errors were encountered: