On Mon, 16 Sep 2019, Joel Brobecker wrote:
> Looking at the configuration file, I believe the git-hooks
> should have most, if not all, of the features that would be needed for
> the GCC repository. In particular, there is already a way to relay
> commits to third-party tools via calling of a script; GDB uses that
> to interface with their Bugzilla database.
I am now looking at the hook setup for GCC. As far as I can see, I'll
initially need a GCC-specific fork of the hooks for two reasons:
* Custom ref naming. The refs/vendors/<vendor>/{heads,tags} and
refs/users/<user>/{heads,tags} scheme described at
<https://gcc.gnu.org/ml/gcc/2019-11/msg00249.html>, to avoid such branches
being fetched by default, will need the hooks to know that such ref names
are to be treated as branches / tags, and to allow non-fast-forward pushes
to them.
* I don't see a configuration option to add custom checks before accepting
a ref update. I think we want a custom check that prevents people for
accidentally pushing merges between the old and new versions of the GCC
history. It's easy to write something called from a pre-receive / update
hook that uses git rev-list to identify problem pushes, but doing that
without a fork of the hooks would require a suitable configuration option
to call out to such a custom script.
--
Joseph S. Myers
[email protected]