Exclude repository-configuration from git-archive#1343
Merged
zariiii9003 merged 1 commit intoJul 11, 2022
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #1343 +/- ##
===========================================
+ Coverage 66.01% 66.06% +0.04%
===========================================
Files 86 86
Lines 8960 8960
===========================================
+ Hits 5915 5919 +4
+ Misses 3045 3041 -4 |
Collaborator
|
I'm not sure i understand your use case. Debian packaging clones the python-can github repo? Why wouldn't they use the source distribution on PyPI? |
Contributor
Author
|
We use the source tarballs from github (not a clone of GH repository). iirc, the reason being that the we want to run all the checks (as found in the upstream development, but often stripped from pypi packages) but avoid binary artifacts (often found in pypi packages). this is a generic answer (I'm currently afk and cannot check the specific reason for python-can) otoh: do you have a specific usecase why you want to include |
zariiii9003
approved these changes
Jul 11, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tracking repository configuration (like
.gitignore) and CI-configuration (.github/,.travis.yml) within a repository is nice, practical and sometimes unavoidable.however, such configs do not place nicely when downstreams import the archives into their own git-based workflows.
e.g. for the Debian packaging of
python-can, we definitely do not want to hide any build-artifacts via.gitignore(our workflow is very different from that of upstream development).we also do not want to accidentally trigger our CI (our CI is supposed to test the packaging, rather than the development).
otoh, we also want to follow the upstream sources as close as possible (that is: without adding/changing/removing any files from the upstream releases).
the typical fix for this is to simply not include the repository-configuration when exporting a snapshot, such as is created automatically by github when downloading a "Release Tarball" (which is really just running
git archivein the background).the
.gitattributesfile in this PR does exactly this: it excludes a number of repository- and CI-configuration files fromgit archive.