public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Iain Sandoe <idsandoe@googlemail.com>
Cc: Richard Biener <richard.guenther@gmail.com>,
	Serge Belyshev <belyshev@depni.sinp.msu.ru>,
	GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH v2] gcc_update: use human readable name for revision string in gcc/REVISION
Date: Mon, 19 Jul 2021 13:09:15 +0200	[thread overview]
Message-ID: <20210719110915.GP2380545@tucnak> (raw)
In-Reply-To: <FA86D690-FDC5-4DB3-B6C9-C0F4BF9DBFED@googlemail.com>

On Mon, Jul 19, 2021 at 11:47:01AM +0100, Iain Sandoe wrote:
> 
> 
> > On 19 Jul 2021, at 11:39, Richard Biener via Gcc-patches <gcc-patches@gcc.gnu.org> wrote:
> > 
> > On Fri, Jul 16, 2021 at 12:37 PM Serge Belyshev
> > <belyshev@depni.sinp.msu.ru> wrote:
> >> 
> >> Based on discussion I've chosen open-coded version without commit hash.
> > 
> > As said I'd prefer one with (shortened) hash,
> 
> Likewise, I’ve been using a local change to produce “r12-2447-gcca1e30db142”  since soon after
> change; I suspect that 12 digits is ‘enough’.  It makes it easier for the folks who want to find by 
> SHA1 as well as folks who want to find by revision number.

If the patch is changed from
	revision=$r;
to
	revision=${r}-g${revision};
then the exact hash length isn't hardcoded to 12 digits, but whatever git
chooses to make it unique (with the current state of repository).
Of course, changes later on in the repository can introduce collisions and
more hash letters might be needed, but that is a general git problem.  And
at least when we have the rXX-YYYY-gZZZZZZZZZ revisions, it is still unique
on the release branches, just one might need to use
$(git gcc-descr `echo $rev | sed 's/-g[0-9a-f]*$//'`)
instead of just
$rev
in case such collision happens if git tells rXX-YYYY-gZZZZZZZZ is ambiguous.

	Jakub


  reply	other threads:[~2021-07-19 11:09 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-15 19:12 [PATCH] gcc_update: use gcc-descr git alias " Serge Belyshev
2021-07-16  7:06 ` Richard Biener
2021-07-16  7:29   ` Jakub Jelinek
2021-07-16  9:22     ` Richard Biener
2021-07-16  9:36       ` Jakub Jelinek
2021-07-16  9:39         ` Richard Biener
2021-07-16 10:37           ` [PATCH v2] gcc_update: use human readable name " Serge Belyshev
2021-07-19 10:39             ` Richard Biener
2021-07-19 10:47               ` Iain Sandoe
2021-07-19 11:09                 ` Jakub Jelinek [this message]
2021-07-19 11:23                   ` [PATCH v3] " Serge Belyshev
2021-09-06  9:49                     ` Serge Belyshev
2021-09-06  9:54                       ` Jakub Jelinek
2021-09-06 13:01                         ` Serge Belyshev
2021-07-19 13:53     ` [PATCH] gcc_update: use gcc-descr git alias " Richard Earnshaw
2021-07-19 14:09       ` Jakub Jelinek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210719110915.GP2380545@tucnak \
    --to=jakub@redhat.com \
    --cc=belyshev@depni.sinp.msu.ru \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=idsandoe@googlemail.com \
    --cc=richard.guenther@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).