]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
newvers: tweak uname to be more useful
authorWarner Losh <imp@FreeBSD.org>
Mon, 25 Jan 2021 19:53:31 +0000 (12:53 -0700)
committerWarner Losh <imp@FreeBSD.org>
Mon, 1 Feb 2021 22:31:35 +0000 (15:31 -0700)
commitf19a4e97d3b0905dfda5aaebba49f68a1e07fa3e
tree1daa01ff48abb436b740b3c2973984f2624559a2
parentc415d0df47fc4b144c029263fac47ad4df81a803
newvers: tweak uname to be more useful

The current uname is branch-cXXXX-gHASH

Three changes to make uname more useful.
1. Move from using git rev-list --count to git rev-lis --count --first-parent
   since that gives a better, incrementing number.
2. Report this count as 'nXXXXX' rather than 'cXXXXX' because c is part of
   a hash and we've changed the sematnics of XXXXX
3. Remove g to make HASH cut and pastable.

Durting review, #1 & #3 had the largest consensus. There was a diversity of
opinion on #2, but on the whole it was positive so I'll acknowledge the dissent,
but move forward with something seems to have support since the dissent was all
about what letter to use where I chose 'n'.

MFC After: 3 days
Reviewed by: rgrimes, emaste (earlier version)
Differential Revision: https://reviews.freebsd.org/D28338

(cherry picked from commit 8a51f14a7833fd14e1f125e63a0af9d260dcd287)
sys/conf/newvers.sh