Add display_error_message to reduce duplication.
[git-central.git] / server / update-prefer-underscores
index 9f9cd29..db728dc 100644 (file)
@@ -4,6 +4,8 @@
 # that ratetables could still sneak when, but we'll give
 # people the benefit of the doubt.
 
+. $(dirname $0)/functions
+
 # Command line
 refname="$1"
 oldrev="$2"
@@ -11,12 +13,7 @@ newrev="$3"
 
 if expr "$oldrev" : '0*$' >/dev/null ; then
        if expr "$refname" : '.*[A-Z].*' ; then
-               echo "----------------------------------------------------"
-               echo
-               echo "Please prefer underscored branch names (e.g. rate_tables)"
-               echo "instead of camel-casing branch names (e.g. rateTables)."
-               echo
-               echo "----------------------------------------------------"
+               display_error_message "Please use underscored branch names (e.g. rate_tables)"
                exit 1
        fi
 fi