Skip to content

The documented .git_archival.txt causes git archives to change hash after first post-release commit is made #806

Closed
@mgorny

Description

@mgorny

The documentation suggests using the following content for the .git_archival.txt file:

node: $Format:%H$
node-date: $Format:%cI$
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
ref-names: $Format:%D$

This means that if a tag is created on top of the main branch, the file initially contains e.g.:

ref-names: HEAD -> main, tag: v1

but once another commit is added and main no longer corresponds to the tag, it changes to:

ref-names: tag: v1

This causes the git archive hash to change. This is a problem for distributions like Gentoo that are using git archives generated by GitHub. The initial archive that we fetch once the release is made changes once upstream makes new commits.

See e.g.: https://bugs.gentoo.org/895910, https://bugs.gentoo.org/895712

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions