diff --git a/pre-receive b/pre-receive index b97c0a1..a612e58 100755 --- a/pre-receive +++ b/pre-receive @@ -36,6 +36,12 @@ if [[ "x${HOME}" == "x" ]]; then export HOME fi +styleguide_url='http://docs.puppetlabs.com/guides/style_guide.html' +git cat-file -e $newrev:.puppetstyle.url >/dev/null 2>&1 +if [[ $? -eq 0 ]]; then + styleguide_url=$(git show $newrev:.puppetstyle.url) +fi + tmpdir=`mktemp -d` tmpfile="$tmpdir/candidate" @@ -66,7 +72,7 @@ while read oldrev newrev refname; do rc=$? if [[ $rc != 0 ]]; then if [[ $warned = 0 ]]; then - echo -e "\e[0;33m" "Please follow the puppet module styleguide (http://docs.puppetlabs.com/guides/style_guide.html)." "\e[0m" + echo -e "\e[0;33m" "Please follow the puppet module styleguide (${styleguide_url})." "\e[0m" echo -e "\e[0;33m" "The above ERROR/WARNING messages are informational only. The commit has not been blocked for this reason. In the future, these may cause your commit to be refused." "\e[0m" warned=1 fi