3 head=$(git rev-parse HEAD)
4 branch=$(git symbolic-ref --quiet HEAD)
12 branch=${branch##refs/heads/}
21 git branch -r --contains $head | grep --quiet "origin/$branch"
22 if [ $? -ne 0 ] ; then
23 echo "$branch has not been pushed"
27 # Handle stable special to look for the annotated tag
28 if [ "$branch" == "stable" ] ; then
29 describe=$(git describe $head 2>/dev/null)
30 if [ $? -eq 0 ] ; then
38 number=$(git rev-list --first-parent "$head" ^origin/stable | wc -l)
39 echo "$branch-$number"