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