develooper Front page | perl.perl5.porters | Postings from January 2016

Re: git client hook to enforce a smoke test before commit

Thread Previous | Thread Next
H.Merijn Brand
January 30, 2016 09:25
Re: git client hook to enforce a smoke test before commit
Message ID:
On Fri, 29 Jan 2016 17:16:53 -0500, Jarkko Hietaniemi <>

> I've been using this lately, saved me some oopsies, wrote them after 
> some embarrassing and rage-inducing incidents.  I'm not that well versed 
> in git, very probably enhancements and fixes can be made.
> So what this does: before git push, a test build is launched, and only 
> if that passes, and one hits 'y' in the keyboard, it gets truly pushed. 
> There's special code for handling the "Greer smokes".
> (1) The .git/hooks/pre-push is a symlink to the attached 

/me just wonders why that is all written in shell code and not in
perl :)

> (2) That *.sh calls the attached perl-git-build which I have in my $PATH
> (3) The perl-git-build opens $HOME/.perl-git-build.rc, sample below
> In my setup my laptop is a little old and tired, but I have a relatively 
> beefy and underutilized desktop.  The perl-git-guild ssh:s into it, 
> prepares the source tree appropriately (see below) and does the build. 
> That is the remote_host in the .rc file, like this:
> remote_host=SERVER.NAME.HERE
> remote_jobs=8
> remote_git_clone_dir=perl5-git/perl
> remote_configure_flags=
> The perl-git-build can be used also explicitly to do quickie test 
> builds.  There are three 'modes': plain, patch, and snapshot.  The 
> 'plain' mode just does a git clone of blead HEAD (I guess the name 
> 'plain' is not the best possible).  The 'patch' does git format-patch 
> $origin_sha.. of the local head and in the build host applies those 
> patches.  The 'snapshot' does git archive of of the local head and 
> unpacks that in the remote host.
> Enjoy responsibly.

H.Merijn Brand   Perl Monger
using perl5.00307 .. 5.23   porting perl5 on HP-UX, AIX, and openSUSE

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About