Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Dec 2024 11:15:58 +0800
From:      Zhenlei Huang <zlei@FreeBSD.org>
To:        Ed Maste <emaste@freebsd.org>
Cc:        Gleb Smirnoff <glebius@freebsd.org>, John Baldwin <jhb@freebsd.org>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org
Subject:   Re: git: a1097094c4c5 - main - newvers: Set explicit git revision length
Message-ID:  <2FBF4C12-1A98-4404-92A8-4B7AA3520662@FreeBSD.org>
In-Reply-To: <CAPyFy2D_GYaJut8kTU0H9H9AT%2BGet__4JQj7AEwZg7%2BewXTV=w@mail.gmail.com>
References:  <202412131306.4BDD6bxu011253@gitrepo.freebsd.org> <e827f951-e747-45d6-b4d8-a74a18734bae@FreeBSD.org> <CAPyFy2BC3Nn%2B7t3kNqhpjUJbdFG3SV4EErs0xS9kR0ufOiQ3XA@mail.gmail.com> <e9cf66e6-e43a-4ee4-a622-b1c5e0c1aa75@FreeBSD.org> <CAPyFy2CxNkcA93P-3q-WSNiCXv4DxaBx6YP1p1s=VAhOaaKGMw@mail.gmail.com> <Z2MChH8931gQACQ7@cell.glebi.us> <CAPyFy2D_GYaJut8kTU0H9H9AT%2BGet__4JQj7AEwZg7%2BewXTV=w@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help


> On Dec 19, 2024, at 5:21 AM, Ed Maste <emaste@freebsd.org> wrote:
>=20
> On Wed, 18 Dec 2024 at 12:12, Gleb Smirnoff <glebius@freebsd.org> =
wrote:
>>=20
>> E> The status quo of --short=3D12 should be fine for quite some time.
>>=20
>> AFAIU John's concern is that you can't guarantee a reproducible build =
from a
>> "dirty" repository.  A repository that has more branches than just =
the official
>> ones.  I just make a quick check on Netflix repo, that has both the =
current
>> FreeBSD history and the before-the-official-git history together, as =
well as
>> splitted ports subdirectories and of course our own stuff.  For short =
hashes
>> there are roughly 2x more ambiguities than for a "clean" repo.  =
Apparently
>> chance of collision on a long hash is also doubled.
>=20
> I suspect the six or seven character hashes I listed are still unique
> in your repository. If not, adding one more character to get to seven
> or eight will be enough. Pick a release and give `git rev-parse
> --verify --short=3D1 <hash>` a try in your repo -- I'm sure you'll get =
a
> unique short hash that's still much shorter than 12 characters.


Just a reminder, we also have git_cnt, so even a combination of non-uniq
short git hash and `git_cnt` is still sufficient to spot which version =
was built from.

So I do not think we need pay much concern with this, unless we drop =
`git_cnt`.

Best regards,
Zhenlei




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2FBF4C12-1A98-4404-92A8-4B7AA3520662>