Jim Meyering <[EMAIL PROTECTED]> wrote:
> Simon Josefsson <[EMAIL PROTECTED]> wrote:
>> Jim Meyering <[EMAIL PROTECTED]> writes:
>>
>>> Does anyone object to my installing a server-side hook
>>> that would prevent pushing merge commits on master?
>>> In our experience here (with gnulib.git), pushing a merge
>>> commit is always unintentional.
>>
>> +1 from me.  How would you do that?  I'd like to do it in some other
>> projects.  It is easy to inadvertently send a merge commit.
>
> Apply the patch below to git.git on its "maint" branch,
> then copy templates/hooks--update.sample into your server-side
> repository as an executable repo.git/hooks/update.
>
> Finally, server-side, set the config variable for each repo/branch pair:
>
>   git --git-dir=/path/to/your-proj.git config --bool \
>     hooks.denymerge.master true

About an hour ago I enabled this for "master" in each of
the gnulib, coreutils, and idutils repositories.


Reply via email to