[PATCH] contrib: git descr/undescr aliases

Roman Zhuykov zhroma@ispras.ru
Tue Jan 14 10:18:00 GMT 2020


13.01.2020 14:37, Jakub Jelinek wrote:
> The following patch adds the descr/undescr aliases (for converting to
> monotonically increasing revision numbers and back) there next to svn-rev.
> Both have been changed to use basepoints/gcc-* tags instead of
> branchpoints/gcc-*, the first one now supports --full option, where
> $ git descr origin/master
> r10-5835
> $ git descr --full origin/master
> r10-5835-g1fc15853e301337b46d7f1234966a6244ef0cdab
> where the second form is what is used in gcc-cvs mail bodies and bugzilla
> comments from commits, the former what is used in the subjects.
> The second alias has been tweaked to use git config --get gcc-config.upstream
> with fallback to origin to be able to deal with non-default upstream
> configurations.
>
It was a bit confusing to see "git descr" here in posted patch and "git 
gcc-descr" actually committed.
Moreover "git gcc-descr" doesn't work for me with old git:

~$ git --version
git version 2.7.4
~$ git clone git://gcc.gnu.org/git/gcc test
<...>
~$ cd test/
~/test$
~/test$ ./contrib/gcc-git-customization.sh
<...>
~/test$ git describe --all --abbrev=40 --match 'basepoints/gcc-[0-9]*' origin/master
basepoints/gcc-10-5938-gedabbec31e3bfc9a9757f80c8610706ed00e5a1a
~/test$ git gcc-descr origin/master
~/test$

So, locally I have to fix alias removing "tags/" part in commands like "sed -n 's,^tags/basepoints/gcc-,r,p'".

With new git v2.24.0 alias works fine.  Investigation shows it was changed inside git by commit https://github.com/git/git/commit/1bba00130a1a0332ec0ad2f878a09ca9b2b18ee2 two years ago.  So, only git v2.16.2, v2.17.0 or newer versions correctly run current alias.  Not sure we want to bother about supporting older versions.

--
Roman


PS. We at ISPRAS see that for ~28 hours (11 Jan 2020, 18:00 UTC - 12 Jan 2020, 22:00 UTC) our servers haven't received any gcc mailing list letters, but they are available at https://gcc.gnu.org/ml/ archives (totally 6 mails on gcc@ and 16 on gcc-patches@ were lost).  Looking also at obviously corruptedhttps://gcc.gnu.org/ml/gcc-patches/2020-01/msg00674.html  it is reasonable to assume that it was some worldwide issue because of high "git clone" server load, and I wonder not to see any discussion here.



More information about the Gcc-patches mailing list