bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: automatically preventing merge commits on master


From: Jim Meyering
Subject: Re: automatically preventing merge commits on master
Date: Tue, 14 Oct 2008 18:04:32 +0200

Jim Meyering <address@hidden> wrote:
> Simon Josefsson <address@hidden> wrote:
>> Jim Meyering <address@hidden> 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

[Prev in Thread] Current Thread [Next in Thread]