[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Savannah-hackers-public] Re: prevent merge commits?
From: |
Jim Meyering |
Subject: |
[Savannah-hackers-public] Re: prevent merge commits? |
Date: |
Sat, 08 Aug 2009 09:15:26 +0200 |
Simon Josefsson wrote:
> Jim Meyering <address@hidden> writes:
>> Simon Josefsson wrote:
>>> Hi Jim. I think you fixed so that it isn't possible to push merge
>>> commits into gnulib, right? I'd like to do the same for my projects (in
>>> particular gnutls) so I'm wondering if it is documented somewhere how to
>>> do this, or if it requires special admin bits on the savannah server.
>>
>> It requires an update hook on the server.
>
> OK, that's what I thought.
>
>> Tell me their names and I'll do it today or tomorrow.
>
> Project names are:
>
> gnutls
> libtasn1
> libidn
> gsasl
> shishi
> gss
> libntlm
> autobuild
> git2cl
Done, as follows:
# simon_projs='
gnutls
libtasn1
libidn
gsasl
shishi
gss
libntlm
autobuild
git2cl
'
# dir=/vservers/vcs-noshell/srv/git;for i in $(echo $simon_projs); do echo $i;
h=$dir/$i.git/hooks; chattr -i $h && ln -sf --backup
/usr/local/bin/git-update-hook $h; chattr +i $h; done
gnutls
libtasn1
libidn
gsasl
shishi
gss
libntlm
autobuild
git2cl
This is the switch that controls this:
# hooks.denymerge.BRANCH_NAME
# When this boolean is true, you may not push a merge commit to BRANCH_NAME.
# By default, you may.
Turned on for all "master" branches like this:
# dir=/vservers/vcs-noshell/srv/git;for i in $(echo $simon_projs); do
echo $i; git --git-dir=$dir/$i.git config hooks.denymerge.master true; done
FYI, it prohibits pushing trailing blanks as well, via this setting:
# hooks.allowbadwhitespace
# This boolean sets whether you may push a commit that adds bad whitespace.
# By default, you may not.
Let me know if you'd prefer to toggle that for any of them.
- [Savannah-hackers-public] Re: prevent merge commits?,
Jim Meyering <=