Remove ref-names
from .git_archival.txt
#444
Merged
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.
Howdy! @webknjaz recently posted about this issue with
ref-names
on a package I maintain, so I thought I’d also submit a change the recommendations/instructions/templates here (where I think I originally learned about.git_archival.txt
).It turns out that the
ref-names
field in.git_archival.txt
will generate a different value depending on whether the commit that an archive was built from was the head of a branch at the time of archiving. That's a problem because it means someone trying to compare the hash digests of two archives built from the same commit might get different results based on when the archives were made, and not on any other intrinsic feature of the archives' content (e.g. if I wanted to verify a published archive from an official release of a package against an archive I made the package’s git repo, I might get a different hash). This removes the field in order to make Git archives a bit more stable and useful.There’s some discussion and detail in setuptools-scm’s repo at: pypa/setuptools-scm#806. In particular, this comment about Arch Linux packaging was pretty convincing for me that this is an issue: pypa/setuptools-scm#806 (comment)