ZaneA/Gitolite-Hooks — pull request #2 by pbchase (2013-09-29 11:36:39+00:00)
Title: Allow gitolite.conf to specify the branch name to be hooked

I added a feature to the post-receive script to allow an alternative branch to be specified. I think this would be useful for automated deployment of test branches to test systems without interfering with the automated deployment of master to production systems. The feature can be activated by setting a gitolite config option on the repo

option ENV.BRANCH = branchName

This code exploits a feature of Gitolite v3.5.2 to set arbitrary environment variables. This should run fine in older versions of gitolite, but it cannot not be activated in those older versions. The requirement for v3.5.2 is noted in the code, but not in any documentation at this time.

Philip