3 # Tags should only be allowed to point to commits that are within a branch.
10 # Only interested in tags
11 if [[ "$refname" =~ refs/tags/(.*) ]] ; then
12 short_refname=${BASH_REMATCH[1]}
17 # Except if they're getting deleted
18 if [ "$newrev" == "0000000000000000000000000000000000000000" ] ; then
22 contains=$(git branch --contains "$newrev" | wc -l)
23 if [ $contains -eq 0 ] ; then
24 echo "----------------------------------------------------"
26 echo "The tag $short_refname is not included in any branch."
28 echo "----------------------------------------------------"