From 329170b8805e16f6b32a1923f7e8c7b781aa0721 Mon Sep 17 00:00:00 2001 From: Rob Brackett Date: Thu, 27 Jun 2024 15:19:06 -0700 Subject: [PATCH] Remove `ref-names` from `.git_archival.txt` (#444) 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. --- .git_archival.txt | 1 - docs/pages/guides/packaging_classic.md | 1 - docs/pages/guides/packaging_simple.md | 1 - {{cookiecutter.project_name}}/.git_archival.txt | 1 - 4 files changed, 4 deletions(-) diff --git a/.git_archival.txt b/.git_archival.txt index 8fb235d7..7c510094 100644 --- a/.git_archival.txt +++ b/.git_archival.txt @@ -1,4 +1,3 @@ node: $Format:%H$ node-date: $Format:%cI$ describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$ -ref-names: $Format:%D$ diff --git a/docs/pages/guides/packaging_classic.md b/docs/pages/guides/packaging_classic.md index 097b1ed3..dfd50230 100644 --- a/docs/pages/guides/packaging_classic.md +++ b/docs/pages/guides/packaging_classic.md @@ -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): diff --git a/docs/pages/guides/packaging_simple.md b/docs/pages/guides/packaging_simple.md index 6febc6f0..65296f5a 100644 --- a/docs/pages/guides/packaging_simple.md +++ b/docs/pages/guides/packaging_simple.md @@ -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): diff --git a/{{cookiecutter.project_name}}/.git_archival.txt b/{{cookiecutter.project_name}}/.git_archival.txt index 8fb235d7..7c510094 100644 --- a/{{cookiecutter.project_name}}/.git_archival.txt +++ b/{{cookiecutter.project_name}}/.git_archival.txt @@ -1,4 +1,3 @@ node: $Format:%H$ node-date: $Format:%cI$ describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$ -ref-names: $Format:%D$