1#!/bin/sh 2# 3# An example hook script to mail out commit update information. 4# 5# To enable this hook: 6# (1) change the recipient e-mail address 7# (2) make this file executable by "chmod +x update". 8# 9 10recipient="commit-list@mydomain.xz" 11 12ifexpr"$2":'0*$'>/dev/null 13then 14echo"Created a new ref, with the following commits:" 15 git-rev-list --pretty"$2" 16else 17echo"New commits:" 18 git-rev-list --pretty"$3""^$2" 19fi| 20mail-s"Changes to ref$1""$recipient" 21exit0