Skip to content
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

.gitattributes not handled properly with git archive call #444

Open
LecrisUT opened this issue Feb 27, 2023 · 0 comments · May be fixed by #445
Open

.gitattributes not handled properly with git archive call #444

LecrisUT opened this issue Feb 27, 2023 · 0 comments · May be fixed by #445
Labels
bug Something is clearly a bug effort/medium Can be done in 1-2 days gain/medium Affects multiple users

Comments

@LecrisUT
Copy link

For example if the project is built with setuptools_scm, it can use an automatically generated file .git_archival.txt in case the tar ball is not a git repo, specifially:

# .gitattributes
.git_archival.txt  export-subst

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

Will generate the following file after running git archive HEAD

# .git_archival.txt
node: 3e4c4c351099b04529ac3c951b720e35d11b5ef0
node-date: 2023-02-17T16:29:19+01:00
describe-name: v0.2.1-rc1
ref-names: HEAD -> rpm-spec, tag: v0.2.1-rc1, LecrisUT/rpm-spec

The issue is that if we run as git archive HEAD:./, this generation breaks and it is not generated.

My understanding is that the path ./ after the colon : is to specify the relative path to the git repository to archive. If that is the case, it should be fixable by changing it to:

git archive HEAD ./
@LecrisUT LecrisUT linked a pull request Feb 27, 2023 that will close this issue
@FrostyX FrostyX added effort/medium Can be done in 1-2 days gain/medium Affects multiple users bug Something is clearly a bug labels Jan 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is clearly a bug effort/medium Can be done in 1-2 days gain/medium Affects multiple users
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants