From owner-freebsd-git@freebsd.org Fri Aug 7 13:22:41 2020 Return-Path: Delivered-To: freebsd-git@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3F06B3BA935 for ; Fri, 7 Aug 2020 13:22:41 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BNQyT0zPkz4Qfd; Fri, 7 Aug 2020 13:22:41 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:470:7a58:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "Let's Encrypt Authority X3" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id E640E13E3B; Fri, 7 Aug 2020 13:22:40 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:470:7a58::4178:cb5a:4083:fea5] (unknown [IPv6:2001:470:7a58:0:4178:cb5a:4083:fea5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 5BFC4270F; Fri, 7 Aug 2020 15:22:38 +0200 (CEST) From: Dimitry Andric Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_BC548FFB-8FB8-4578-9BFF-AEA029128AC7"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.15\)) Subject: Re: SVN Revision-Like IDs in Git Date: Fri, 7 Aug 2020 15:22:30 +0200 In-Reply-To: Cc: "Sideropoulos, Alexander" , freebsd-git@freebsd.org, "Maxwell, Larus" To: Warner Losh References: <013F16E7-DDBB-4C2F-829D-D08B53CC7585@netapp.com> X-Mailer: Apple Mail (2.3445.104.15) X-BeenThere: freebsd-git@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Discussion of git use in the FreeBSD project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Aug 2020 13:22:41 -0000 --Apple-Mail=_BC548FFB-8FB8-4578-9BFF-AEA029128AC7 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 7 Aug 2020, at 03:26, Warner Losh wrote: >=20 > On Thu, Aug 6, 2020, 4:01 PM Sideropoulos, Alexander < > Alexander.Sideropoulos@netapp.com> wrote: >=20 >> Hey folks, >>=20 >> According to this page... >>=20 >> = https://hackmd.io/_lvyl1CfTsayB3L0v4fmLA#What%E2%80%99s-with-the-funny-rev= ision-hashes-I-want-revision-numbers >>=20 >> ...there are no plans to provide an SVN-revision-like ID for Git = commits >> once the switch-over happens. >>=20 >> At NetApp, we rely on the SVN revision number to uniquely identify = our >> FreeBSD baseline and every cherry-picked patch we apply on top of it. = We >> could update all our tooling to accept Git hashes, but this is not a = small >> task. And I imagine we are not the only downstream project reliant = upon SVN >> revision numbers. >>=20 >> Since the SVN revision ID is really just an arbitrary number, has = there >> been any thought in simply continuing to manufacture these numbers = for Git >> commits going forward? It could even be a post-commit operation where = the >> Git notes are updated with a unique (increasing) ID, just as is done = today. >>=20 >> Thoughts? >>=20 >=20 > Git has the ability to generate a number of commits since the last tag = (or > maybe arbitrary tag). That is appropriately the same thing if you = don't > need temporal stability between branches... A similar discussion has also taken place in the past when the LLVM project was planning to migrate from Subversion to Git (and then to GitHub). The gist was mostly written down here: = https://llvm.org/docs/Proposals/GitHubMove.html#on-managing-revision-numbe= rs-with-git In short, if you forbid merge commits (either by policy or some server side hook), you can have a semi-linear history, at least per branch. Then you can use e.g. git describe output, or count the number of commits since a particular starting point in the branch. -Dimitry --Apple-Mail=_BC548FFB-8FB8-4578-9BFF-AEA029128AC7 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCXy1VlgAKCRCwXqMKLiCW o5yBAKCWl9431/cb/SpS75nFEDv3kh2ALwCgxI8mphCrY/3jut9GBRJcwZsHf0Y= =Xk4g -----END PGP SIGNATURE----- --Apple-Mail=_BC548FFB-8FB8-4578-9BFF-AEA029128AC7--