Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Aug 2020 15:22:30 +0200
From:      Dimitry Andric <dim@FreeBSD.org>
To:        Warner Losh <imp@bsdimp.com>
Cc:        "Sideropoulos, Alexander" <Alexander.Sideropoulos@netapp.com>, freebsd-git@freebsd.org, "Maxwell, Larus" <Larus.Maxwell@netapp.com>
Subject:   Re: SVN Revision-Like IDs in Git
Message-ID:  <CCFA8C6A-CCE9-43DB-AF1D-7357DC0B185C@FreeBSD.org>
In-Reply-To: <CANCZdfoh85FWJ5wfkDAZzxKwcAwTTy7Dht4BUHJ=JT_L7pDH8g@mail.gmail.com>
References:  <013F16E7-DDBB-4C2F-829D-D08B53CC7585@netapp.com> <CANCZdfoh85FWJ5wfkDAZzxKwcAwTTy7Dht4BUHJ=JT_L7pDH8g@mail.gmail.com>

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

--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 <imp@bsdimp.com> 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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CCFA8C6A-CCE9-43DB-AF1D-7357DC0B185C>