[RFC] Port git gcc-descr to Python

Martin Liška mliska@suse.cz
Mon Oct 11 12:32:58 GMT 2021


On 10/8/21 13:12, Jakub Jelinek wrote:
> I think changing the default is ok, but dropping --full is not,
> it should stay and behave the way it did before (i.e. print
> r12-4245-gdb3d7270b42fe27fb05664c4fdf524ab7ad13a75
> same thing as the new default except for full hash instead of
> first 14 chars from it).

All right, makes sense, but updating the git alias doesn't work for me.
Thus I'm suggesting a Python replacement of it, which does:

$ ./describe.py basepoints/gcc-11

r11-0-g50ee04838efc16


$ ./describe.py

r12-4285-g07dd3bcda17f97


$ ./describe.py --short

r12-4285


$ ./describe.py --full

r12-4285-g07dd3bcda17f97cf5476c3d6f2f2501c1e0712e6


Motivation behind usage of Python:
- the script can be put to contrib and nobody would have to re-run contrib/gcc-git-customization.sh locally
- it's not a single line script and one doesn't have to do bash escaping in the contrib/gcc-git-customization.sh script
- positional argument support

Thoughts?

Note I can port the same way the counterpart script.
One another note:

$ git gcc-descr basepoints/gcc-11

r11-0


seems to me like bogus.

Cheers,
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: describe.py
Type: text/x-python
Size: 1848 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20211011/ac3b2aa5/attachment.py>


More information about the Gcc-patches mailing list