Date: Wed, 18 Dec 2024 16:21:24 -0500 From: Ed Maste <emaste@freebsd.org> To: Gleb Smirnoff <glebius@freebsd.org> Cc: 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: <CAPyFy2D_GYaJut8kTU0H9H9AT%2BGet__4JQj7AEwZg7%2BewXTV=w@mail.gmail.com> In-Reply-To: <Z2MChH8931gQACQ7@cell.glebi.us> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 18 Dec 2024 at 12:12, Gleb Smirnoff <glebius@freebsd.org> wrote: > > E> The status quo of --short=12 should be fine for quite some time. > > 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. 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=1 <hash>` a try in your repo -- I'm sure you'll get a unique short hash that's still much shorter than 12 characters.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPyFy2D_GYaJut8kTU0H9H9AT%2BGet__4JQj7AEwZg7%2BewXTV=w>