Re: /usr/src Git --count (count of commits to the branch)

From: Graham Perrin <grahamperrin_at_gmail.com>
Date: Tue, 6 Apr 2021 04:06:13 +0100
On 05/04/2021 20:43, Herbert J. Skuhra wrote:
> On Mon, 05 Apr 2021 21:00:47 +0200, Graham Perrin wrote:
>> Why is the count so different?
>>
>> The count today: 257732; and the result of today's build: n245827
>>
>> % bectl list -c creation
>> BE                    Active Mountpoint Space Created
>> r357746-Waterfox      -      -          59.2G 2020-03-10 18:24
>> n2733-5ac839029d-f    -      -          12.5G 2021-03-04 09:17
>> n257337-5fe0cd6503d-e -      -          1.55G 2021-03-23 07:56
>> n257551-66f138563be-a -      -          129M  2021-03-25 09:35
>> n257551-66f138563be-b -      -          882M  2021-03-26 19:27
>> n257551-66f138563be-c -      -          95.4M 2021-03-31 16:26
>> n257732-361e9501800-a NR     /          127G  2021-04-05 18:48
>> % uname -v
>> FreeBSD 14.0-CURRENT #91 main-n245827-361e9501800: Mon Apr  5 17:59:57
>> BST 2021
>> root_at_mowa219-gjp4-8570p:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG
>> % git -C /usr/src rev-list --count HEAD
>> 257732
> /usr/src/sys/conf/newvers.sh uses a different command:
>
>    git_cnt=$($git_cmd rev-list --first-parent --count HEAD 2>/dev/null)
>                                ^^^^^^^^^^^^^^
> See:
>
> commit 8a51f14a7833fd14e1f125e63a0af9d260dcd287
> Author: Warner Losh
> Date:   Mon Jan 25 12:53:31 2021 -0700

Perfect! Thank you. I'll update my script.

<https://cgit.freebsd.org/src/commit/?id=f19a4e97d3b0905dfda5aaebba49f68a1e07fa3e&h=main>
Received on Tue Apr 06 2021 - 01:06:18 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:28 UTC