This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC Git hooks
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: Jason Merrill <jason at redhat dot com>, Maxim Kuvyrkov <maxim dot kuvyrkov at linaro dot org>, gcc Mailing List <gcc at gcc dot gnu dot org>, Gerald Pfeifer <gerald at pfeifer dot com>, Daniel Berlin <dberlin at dberlin dot org>
- Date: Fri, 10 Jan 2020 21:56:56 +0400
- Subject: Re: GCC Git hooks
- References: <CADzB+2mqKfG2iEfHZXsv5qJ_U8NQ-cGTgvGRgPWi-5mj3Hot_A@mail.gmail.com> <20190916150650.GB4945@adacore.com> <alpine.DEB.2.21.2001091417030.4040@digraph.polyomino.org.uk> <alpine.DEB.2.21.2001092158480.27516@digraph.polyomino.org.uk>
> * Additional branch namespaces refs/users/<user>/heads and
> refs/vendors/<vendor>/heads, and similar tag namespaces
> refs/users/<user>/tags and refs/vendors/<vendor>/tags.
Hmmm. Note to self: I missed the fact that this namespace was
also used for tags.
> * Only allowing branch deletion for certain ref patterns (refs/users and
> refs/vendors in this case).
Once we add support for the update-hook, I think you'll be able to
implement that feature there.
This might be of general interest however, so I'll think about
something. Up until now, the configuration options taking patterns
have always taken pattern that activate the option of they match.
Here, we want "turn this option on, except in those cases".
Maybe the way to go is to have two options, both related:
- allow-branch-deletion (default: True)
- branch-deletion-exception (default: empty list)
The second option is ignored if allow-branch-deletion is True.
Project that want to reject them all, just sets the option to False.
Projects like GCC then use both:
allow-branch-deletion: True
branch-deletion-exception = <vendors_branch_ref_regexp>
branch-deletion-exception = <users_branch_ref_regexp>
> * Controlling when non-fast-forward pushes are allowed for ref patterns
> outside refs/heads.
OK.
--
Joel