[llvm-dev] [monorepo] Pre-push hook to prevent pushing merge commits

Louis Dionne via llvm-dev llvm-dev at lists.llvm.org
Fri Nov 9 14:30:27 PST 2018



> On Nov 9, 2018, at 11:44, David Greene <dag at cray.com> wrote:
> 
> Roman Lebedev via llvm-dev <llvm-dev at lists.llvm.org> writes:
> 
>> (I don't think you can have server-side hooks on github, so if that is required,
>> the master (as in, not a mirror, but the one you commit things into)
>> git monorepo can't be located on github..)
> 
> This is the main reason we did not go with a GitHub solution for our
> code.
> 
> If we used a pull request model for the monorepo then review can
> mitigate the kinds of problems that server-side hooks address, but of
> course it's a more manual process and prone to mistakes.  I understand
> that a decision in that direction is orthogonal to moving to git.
> 

I agree that a server side hook would be much better, but encouraging contributors to install a client side hook may still be better than nothing. We could for example put a link to the hook in the setup instructions for the monorepo. People don’t have to set it up but I expect most people would.

If we go with a pull request model, it should be possible to create a hook that checks for that using GitHub. However, this is orthogonal and I am not proposing that at this moment.

Louis


More information about the llvm-dev mailing list