GIT: Monotonically increasing trunk and release branch ids

Jakub Jelinek
Fri Jan 10 18:50:00 GMT 2020

On Fri, Jan 10, 2020 at 10:09:08PM +0400, Joel Brobecker wrote:
> > > As it is short, could it be something we'd put as first thing in the gcc-cvs
> > > mail subjects (of course, only for trunk and release branch commits; like
> > > the current svn mails start with rNNNNNN - ), and somewhere before or after the hash
> > > in the body which also makes it into bugzilla?
> > 
> > This seems like another thing that would need new features in the
> > hooks to support configuring email subjects and contents like that.
> Can you describe a little more what you are looking for?

So, the current SVN mails are like:
Subject: r280117 - in /trunk/libstdc++-v3: ChangeLog tes...                                                                                        
Author: redi                                                                                                                                       
Date: Fri Jan 10 15:27:50 2020                                                                                                                     
New Revision: 280117                                                                                                                               
libstdc++: Fix testcase for C++98 compatibility                                                                                                    
        * testsuite/25_algorithms/equal/deque_iterators/ Don't use C++11                                                                      
        initialization syntax.                                                                                                                     

and the body is what is added into the bugzilla.
Now, looking at the git test mail, I see:
Subject: [gcc-reposurgeon-8] Test git hooks interaction with Bugzilla.                                                                             
To:                                                                                                                    ;h=3b2b821c3f1bac2ac6dd2481f461ec33a13eac9b                                                            
commit 3b2b821c3f1bac2ac6dd2481f461ec33a13eac9b                                                                                                    
Author: Joseph Myers <>                                                                                                     
Date:   Thu Jan 9 21:44:05 2020 +0000                                                                                                              
    Test git hooks interaction with Bugzilla.                                                                                                      
        PR c/93218                                                                                                                                 
        * Test git hooks interaction with Bugzilla.                                                                                                

and into bugzilla goes:
The master branch has been updated by Joseph Myers <>:

followed by the mail body above Diff:.
I'm not sure if we need the repository name (I bet it will be gcc when
switched over) in the subjects because all mails in gcc-cvs mailing list
will be for that repo (guess it depends on how many people actually actively
use that mailing list, whether they procmail them into separate folders (I
do), or not and what they prefer).

Having the one-line description of the change in the subject is a positive

The changes I was asking for is, for gcc master and releases/gcc-* branch
commits to have the monotonically increasing short ids (printed by git descr
<commithash> with the git aliases I've posted) both somewhere early
in the subject before the one-line description, and somewhere in the body
too.  For release branch commits, perhaps the
or whatever exactly release branch commits would print would be unnecessary,
as 1234th's commit after the branchbase of trunk (i.e. first commit after
branching 9 release branch) or r9-2345 would contain that information
already.  Or if we want to say gcc in there too, let's do it, but not too
much over that.
The URL which is printed separately perhaps would be nicer to into the same
block, so have
commit 3b2b821c3f1bac2ac6dd2481f461ec33a13eac9b
Author: Joseph Myers <>
Date:   Thu Jan 9 21:44:05 2020 +0000
Id:     r10-1234

before the rest, where we could teach bugzilla customization which now
URL-izes rNNNNN for 1-6 decimal digits into
to also URL-ize rNN-NNNN for 1-2 + 1-5 decimal digits into and let that redirect to the corresponding
commit in gitweb.

Maybe even add for 7-40 hexadecimal digits
redirect to;h=NNNNNNN
and then just put as URL those
URLs instead to make it somewhat shorter, and again teach bugzilla to
URLize g3b2b821c3f1bac2ac6dd2481f461ec33a13eac9b with 7-40 hexadecimal


More information about the Gcc mailing list