-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Update .gitattributes to add exlusion lists. #10267
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
base: development
Are you sure you want to change the base?
Update .gitattributes to add exlusion lists. #10267
Conversation
This commit adds a list of files that should be excluded from tarballs when git-archive is used. Signed-off-by: Minos Galanakis <[email protected]>
3f0f9ca
to
08de808
Compare
.git* export-ignore | ||
.pylintrc export-ignore | ||
.mypy.ini. export-ignore | ||
.globalrc export-ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should keep this: it's for people who browse the source code in some IDEs.
.pylintrc export-ignore | ||
.mypy.ini. export-ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess .pylintrc
and .mypy.ini
are only useful to contributors, not for people who only consume the source code. So it may be ok to exclude them. But if you exclude them, it means you can't run all.sh
on the tarball release.
In any case, I can't think of a reason to exclude those but include .uncrustify.cfg
.
.mypy.ini. export-ignore | ||
.globalrc export-ignore | ||
.travis.yml export-ignore | ||
.readthedocs.yaml export-ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why shouldn't it be possible to build a readthedocs version from a tarball release?
.pylintrc export-ignore | ||
.mypy.ini. export-ignore | ||
.globalrc export-ignore | ||
.travis.yml export-ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually we should just remove .travis.yml
, it hasn't been used in a couple of years.
|
||
# Ignore listed files when creating an archive | ||
.github/** export-ignore | ||
.git* export-ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not keep .gitattributes
in the tarball? Other tools such as IDEs and code indexing tools might use it, to recognize *.function
files as C (but I don't know of any tool that does so, I'm just speculating).
@gilles-peskine-arm I have no strong preference, as to the files that should be removed. I do believe the .github/* files should not be included in the tarballs. So I could refactor this to be just this
Would that be reasonable? |
@minosgalanakis I'd say As for |
Description
We are using git-archive as the standard way to generate tarballs. As part of the tarball creation, the tool, is parsing .gitattributes for context.
This pr is using the
export-ignore
directive as defined by git-scm manual to remove certain files that do not belong to a flattened product release of a code-base.The hidden files that I am aiming for are
I have kept the .uncrustify.cfg because there is value in codifying our code-style.
PR checklist
Please remove the segment/s on either side of the | symbol as appropriate, and add any relevant link/s to the end of the line.
If the provided content is part of the present PR remove the # symbol.