git: 51d73a3e46cf - stable/13 - newvers.sh: restore reporting branch names

Mateusz Guzik mjg at FreeBSD.org
Fri Jan 22 14:26:09 UTC 2021


The branch stable/13 has been updated by mjg:

URL: https://cgit.FreeBSD.org/src/commit/?id=51d73a3e46cf9118bc0464c9c0aa99dca7aafe9a

commit 51d73a3e46cf9118bc0464c9c0aa99dca7aafe9a
Author:     Mateusz Guzik <mjg at FreeBSD.org>
AuthorDate: 2021-01-22 13:00:24 +0000
Commit:     Mateusz Guzik <mjg at FreeBSD.org>
CommitDate: 2021-01-22 14:25:48 +0000

    newvers.sh: restore reporting branch names
    
    It got removed arguably without much discussion in the commit which
    added gitup support.
    
    (cherry picked from commit ace7209ce04d0e4dc0e84d5e2eb27fc762e67a01)
---
 sys/conf/newvers.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh
index 2afaa3a92f8e..8739cf6fc498 100644
--- a/sys/conf/newvers.sh
+++ b/sys/conf/newvers.sh
@@ -258,6 +258,10 @@ if [ -n "$git_cmd" ] ; then
 			git="c${git_cnt}-g${git}"
 		fi
 	fi
+	git_b=$($git_cmd rev-parse --abbrev-ref HEAD)
+	if [ -n "$git_b" -a "$git_b" != "HEAD" ] ; then
+		git="${git_b}-${git}"
+	fi
 	if git_tree_modified; then
 		git="${git}-dirty"
 		modified=yes


More information about the dev-commits-src-all mailing list