Fix tags and short_refname assignment.
[git-central.git] / server / update-prefer-underscores
1 #!/bin/sh
2 #
3 # Simply enforces rate_tables instead of rateTables. Note
4 # that ratetables could still sneak when, but we'll give
5 # people the benefit of the doubt.
6
7 # Command line
8 refname="$1"
9 oldrev="$2"
10 newrev="$3"
11
12 if expr "$oldrev" : '0*$' >/dev/null ; then
13         if expr "$refname" : '.*[A-Z].*' ; then
14                 echo "----------------------------------------------------"
15                 echo
16                 echo "Please prefer underscored branch names (e.g. rate_tables)"
17                 echo "instead of camel-casing branch names (e.g. rateTables)."
18                 echo
19                 echo "----------------------------------------------------"
20                 exit 1
21         fi
22 fi
23