3 # Called by git-receive-pack with arguments: refname sha1-old sha1-new
6 recipient="sherlock-commits@host2.netcentrum.cz"
8 branch=${1#refs/heads/}
9 if [ "$branch" == "$1" ] ; then
10 # Not something we care about
13 if [ $branch == origin ] ; then
14 # We are not following the origin
18 out=`mktemp -t gitlog.XXXXXXX`
19 if [ $branch == master ] ; then
26 if expr "$2" : '0*$' >/dev/null ; then
27 echo "Created a new branch $branch, with the following commits:"
29 git-rev-list --pretty --max-count=20 "$3"
30 echo "(and possibly more)"
32 base=$(git-merge-base "$2" "$3")
35 echo "New commits to branch $branch:"
38 echo "Rebased branch $branch, commits from common ancestor:"
42 git-rev-list --pretty "$3" "^$base"
43 git-diff -C "$base" "$3"
44 t=`mktemp -t gitlog.XXXXXXX`
45 git-diff --name-only -r "$base" "$3" >$t
47 if [ ${#subj} -lt 80 ] ; then
55 mutt -x -e 'set charset="utf-8"; set send_charset="us-ascii:iso-8859-2:utf-8"' -s "$subj" "$recipient" <$out