release: sync 'git count' logic with newvers.sh

Sync determining the git count with newvers.sh by adding the
--first-parent argument.  This ensures uname(1) reflects the
file name for snapshots.

Reported by:	Mark Millard
MFC after:	3 days
Sponsored by:	Rubicon Communications, LLC ("Netgate")
This commit is contained in:
Glen Barber 2021-03-17 10:57:32 -04:00
parent 4fbbe52365
commit e5c6913a8d

View File

@ -22,7 +22,7 @@ GITREV!= ${GIT_CMD} -C ${.CURDIR} rev-parse --verify --short HEAD 2>/dev/null ||
. export GITREV
. endif
. if !defined(GITCOUNT) || empty(GITCOUNT)
GITCOUNT!= ${GIT_CMD} -C ${.CURDIR} rev-list --count HEAD 2>/dev/null || true
GITCOUNT!= ${GIT_CMD} -C ${.CURDIR} rev-list --first-parent --count HEAD 2>/dev/null || true
. export GITCOUNT
. endif
.else