GCC Git hooks

Joseph Myers joseph@codesourcery.com
Fri Jan 10 18:15:00 GMT 2020

On Fri, 10 Jan 2020, Joel Brobecker wrote:

> > Plus one further change now: if a newly created branch is in refs/heads/, 
> > require it to be in refs/heads/devel/ or refs/heads/releases/ (i.e. 
> > enforce a particular branch naming convention, in particular to prevent 
> > mistakes where people accidentally push a branch into refs/heads/ because 
> > their push configuration for user or vendor branches was wrong).
> I'm having a hard time understanding this requirement.
> You want to say that, before branch "<xxx>" gets created, you want
> to verify that a branch named either "devel/<xxx>" or "releases/<xxx>"
> does exist?

No.  What we want to ensure is that people don't accidentally create a 
branch called refs/heads/foo when they should (by our naming conventions) 
have created one called refs/heads/devel/foo or 
refs/users/someone/heads/foo.  Our naming conventions mean that all 
branches in refs/heads/ should be called master, devel/something or 
releases/something.  But it's easy for someone to get a "git push" command 
wrong so that it would create a badly named branch.

Joseph S. Myers

More information about the Gcc mailing list