Skip to content

Commit

Permalink
Remove ref-names from .git_archival.txt (#444)
Browse files Browse the repository at this point in the history
It turns out that the `ref-names` field in `.git_archival.txt` will generate a different value depending on whether the commit 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 signatures 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. This removes the field in order to make Git archives a bit more stable and useful.
  • Loading branch information
Mr0grog authored Jun 27, 2024
1 parent 88dc821 commit 329170b
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 4 deletions.
1 change: 0 additions & 1 deletion .git_archival.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
node: $Format:%H$
node-date: $Format:%cI$
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
ref-names: $Format:%D$
1 change: 0 additions & 1 deletion docs/pages/guides/packaging_classic.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@ You should also add these two files:
node: $Format:%H$
node-date: $Format:%cI$
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
ref-names: $Format:%D$
```

And `.gitattributes` (or add this line if you are already using this file):
Expand Down
1 change: 0 additions & 1 deletion docs/pages/guides/packaging_simple.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ You should also add these two files:
node: $Format:%H$
node-date: $Format:%cI$
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
ref-names: $Format:%D$
```

And `.gitattributes` (or add this line if you are already using this file):
Expand Down
1 change: 0 additions & 1 deletion {{cookiecutter.project_name}}/.git_archival.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
node: $Format:%H$
node-date: $Format:%cI$
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
ref-names: $Format:%D$

0 comments on commit 329170b

Please sign in to comment.