Commit graph

5 commits

Author SHA1 Message Date
Martin Liska
88b9d090aa gcc-descr: by default show revision for HEAD
I've made the mistake multiple times while doing a bisection.
One would expect that gcc-descr w/o an argument would print
revision for the current HEAD and not master.
Thus change it.

contrib/ChangeLog:

	* git-descr.sh: By default print revision for HEAD.
2022-07-04 12:27:43 +02:00
Jakub Jelinek
ff060ef08c contrib: Fix up git-descr.sh regression [PR102664]
On Wed, Mar 09, 2022 at 12:40:24PM -0500, Patrick Palka via Gcc-patches wrote:
> On Wed, Mar 9, 2022 at 8:54 AM Mikael Morin <morin-mikael@orange.fr> wrote:
> > Le 08/03/2022 à 18:58, Jonathan Wakely via Gcc-patches a écrit :
> > > Replace \([0-9]\+\) with \([0-9][0-9]*\) or with \([1-9][0-9]*\) in release branch numbers, where
> > > a leading zero does not occur.
> > >
> > Note that you also changed some gcc-[0-9]* to gcc-[1-9]*, which is a
> > typo/thinko I guess?  It looks like it wouldn’t match gcc-10 any more
> > for example…
>
> Perhaps related to this, I noticed the following
>   git gcc-descr ea1ce0d163
> now fails with
>   fatal: No tags can describe 'ea1ce0d163ea1d63b6837144ae4be51d92630007'.
> instead of outputting
>   r0-52309-gea1ce0d163ea1d

That is because of those [0-9] to [1-9] changes which prevent
basepoints/gcc-0 from working.  While basepoints/gcc-005 etc. are certainly
unexpected, basepoints/gcc-0 needs to work.

2022-03-10  Jakub Jelinek  <jakub@redhat.com>

	PR other/102664
	* git-descr.sh: Replace all [1-9] occurrences with [0-9].
	* git-undescr.sh: Likewise.
2022-03-10 09:42:03 +01:00
Jonathan Wakely
17bffa0c9f contrib: Fix non-portable sed commands in gcc-descr [PR102664/]
POSIX sed does not support \? or \+ in its Basic Regular Expression
grammar. Replace the \(tags/\)\? part of the pattern with a substitution
to remove ^tags/ before other substitutions. Replace \([0-9]\+\) with
\([0-9][0-9]*\) or with \([1-9][0-9]*\) in release branch numbers, where
a leading zero does not occur.

contrib/ChangeLog:

	PR other/102664
	* git-descr.sh: Use portable sed commands.
	* git-undescr.sh: Likewise.
2022-03-09 00:19:01 +00:00
Jonathan Wakely
10ecf5182a contrib: Fix gcc-descr script [PR102664]
POSIX expr does not support the 'match' keyword, so the git-descr.sh
scripts should use ':' instead.

contrib/ChangeLog:

	PR other/102664
	* git-descr.sh: Use portable form of expr match.
2022-03-08 16:46:36 +00:00
Martin Liska
9cbfbe2497 contrib: Put gcc-descr and gcc-undescr to file.
contrib/ChangeLog:

	* git-descr.sh: New file.
	* git-undescr.sh: New file.
	Support optional arguments --long, --short and default
	to 14 characters of git hash.
	* gcc-git-customization.sh: Use the created files.

Co-Authored-By: Martin Jambor <mjambor@suse.cz>
2022-01-27 18:44:47 +01:00