git: d6b36d1c83fb - stable/14 - newvers: Set explicit git revision length
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 16 Dec 2024 00:39:28 UTC
The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=d6b36d1c83fbfc8046efa7acb32b676824f6bc8f commit d6b36d1c83fbfc8046efa7acb32b676824f6bc8f Author: Pat Maddox <pat@patmaddox.com> AuthorDate: 2024-12-13 05:28:18 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2024-12-16 00:39:08 +0000 newvers: Set explicit git revision length The --short flag is configurable. Setting an explicit length supports reproducible builds. Signed-off-by: Pat Maddox <pat@patmaddox.com> Reviewed by: emaste, imp Differential Revision: https://github.com/freebsd/freebsd-src/pull/1547 (cherry picked from commit a1097094c4c5d810287aca092f4ab5f9f86a426a) --- sys/conf/newvers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index c77c3818c566..3ff993bdd2ab 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -257,7 +257,7 @@ if [ -n "$svnversion" ] ; then fi if [ -n "$git_cmd" ] ; then - git=$($git_cmd rev-parse --verify --short HEAD 2>/dev/null) + git=$($git_cmd rev-parse --verify --short=12 HEAD 2>/dev/null) if [ "$($git_cmd rev-parse --is-shallow-repository)" = false ] ; then git_cnt=$($git_cmd rev-list --first-parent --count HEAD 2>/dev/null) if [ -n "$git_cnt" ] ; then