Fix post-receive-email test for USER_EMAIL variable.
[git-central.git] / scripts / gc-tattoo
1 #!/bin/sh
2
3 . $(dirname $0)/functions
4
5 git fetch
6
7 set_branch_name
8
9 echo "branch_name='$branch_name'"
10
11 if [ "$branch_name" == "" ] ; then
12         echo "Not on a branch (for $branch_name)"
13         exit 1
14 fi
15
16 describe=$(git describe --tags --always HEAD)
17 case "$describe" in
18         r/*)
19                 describe=${describe##r\/}
20                 echo "$branch_name-$describe"
21                 ;;
22         *)
23                 echo "No commit number tag found"
24                 exit 1
25                 ;;
26 esac
27