From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23026 invoked by alias); 5 Aug 2019 15:20:24 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 22648 invoked by uid 89); 5 Aug 2019 15:20:24 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-4.8 required=5.0 tests=AWL,BAYES_00,KAM_SHORT,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=H*RU:209.85.210.67, HX-HELO:sk:mail-ot, HX-Spam-Relays-External:209.85.210.67 X-HELO: mail-ot1-f67.google.com Received: from mail-ot1-f67.google.com (HELO mail-ot1-f67.google.com) (209.85.210.67) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 05 Aug 2019 15:20:22 +0000 Received: by mail-ot1-f67.google.com with SMTP id j19so8964549otq.2 for ; Mon, 05 Aug 2019 08:20:22 -0700 (PDT) MIME-Version: 1.0 References: <8C62F814-2F57-4D1A-B66F-5C5ACFF37D6C@linaro.org> <4E46E435-F95C-46AD-87F0-8220D2BF4CD4@linaro.org> <7FA7C370-04F5-448E-95D2-426607B99CF4@linaro.org> <846D2EF4-879F-4518-ABA5-7DD74E6B4F18@linaro.org> <42281a3e-7a7a-d115-2468-b01275d00821@suse.cz> <1e000037-44bd-7d5a-3817-d5048ecc4330@suse.cz> In-Reply-To: <1e000037-44bd-7d5a-3817-d5048ecc4330@suse.cz> From: Jason Merrill Date: Mon, 05 Aug 2019 15:20:00 -0000 Message-ID: Subject: Monotonically increasing counter (was Re: [Contrib PATCH] Add scripts to convert GCC repo from SVN to Git) To: =?UTF-8?Q?Martin_Li=C5=A1ka?= , Jakub Jelinek Cc: Richard Biener , Maxim Kuvyrkov , GCC Patches , Paolo Bonzini Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2019-08/txt/msg00278.txt.bz2 On Mon, Aug 5, 2019 at 9:20 AM Martin Li=C5=A1ka wrote: > Based on the IRC discussion with Jakub, there's missing key element of th= e transition. > Jakub requests to have a monotonically increasing revisions (aka rXXXXXXX= ) to be assigned > for the future git revisions. These will be linked from bugzilla and http= ://gcc.gnu.org/rNNNNN > > I don't like the suggested requirement and I would prefer to use git hash= es for both bugzilla > links and general references to revisions. That's what all projects using= git do. I agree. But for those who want a monotonically increasing identifier, there's already one in git: CommitDate. In the discussion of this issue four years ago, https://gcc.gnu.org/ml/gcc/2015-09/threads.html#00028 I provided a set of git aliases to generate and use reposurgeon-style action stamps for naming commits. For Jakub's use-case, the committer part of the action stamp is probably unnecessary, just the date/time part should be enough. Looking at it again, I notice that the different timezones in the committer date would interfere with sorting, so this update to the stamp alias uses UTC unconditionally: stamp =3D "!f(){ TZ=3DUTC git show -s --date=3D'format-local:%Y-%m-%dT%H:%M:%SZ' --format=3D'%cd!%ce' ${1:+\"$@\"}; }; f" To drop the committer from the stamp, remove "!%ce" from the format argumen= t. Jakub, it seems to me that this should do the trick for you; binaries would be named by date/time rather than by revision. What do you think? Jason