develooper Front page | perl.perl5.porters | Postings from March 2013

Re: git-hook to prevent perlbug as patch author

From:
Tony Cook
Date:
March 11, 2013 22:55
Subject:
Re: git-hook to prevent perlbug as patch author
Message ID:
20130311225540.GB11367@mars.tony.develop-help.com
On Thu, Feb 28, 2013 at 12:20:25AM +1100, Tony Cook wrote:
> On Wed, Jan 30, 2013 at 07:38:29AM +0100, Steffen Mueller wrote:
> > I will bribe Dennis into installing such post-receive a hook if
> > somebody provides it.
> 
> An update hook as discussed is attached, with only the following
> change:
> 
> --- update.orig 2013-01-28 11:04:13.000000000 +0100
> +++ update      2013-02-27 13:22:35.000000000 +0100
> @@ -78,6 +78,13 @@
>                 ;;
>         refs/heads/*,commit)
>                 # branch
> +               authoremail=`git log --format=%ae -n1 "$newrev"`
> +               if [ "$refname" = refs/heads/blead ] && 
> +                    ( git config --get-all blacklist.email | grep -qx "$authoremail" ) ;
> +                   then
> +                   echo "*** $authoremail cannot author new commits in blead" >&2
> +                   exit 1
> +               fi
>                 ;;
>         refs/heads/*,delete)
>                 # delete branch
> 
> The blacklisted emails can be configured with git config:
> 
>   cd perl.git
>   git config --add blacklist.email foo@example.com

Should I install this?

Tony



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About