Index: trunk/scripts/git-hooks/sub/update
===================================================================
--- trunk/scripts/git-hooks/sub/update	(revision 2499)
+++ trunk/scripts/git-hooks/sub/update	(revision 2499)
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+ref="$1"
+oldrev="$2"
+newrev="$3"
+
+# --- Safety check
+
+if [ -z "$GIT_DIR" ]; then
+        echo "Don't run this script from the command line." >&2
+        echo " (if you want, you could supply GIT_DIR then run" >&2
+        echo "  $0 <ref> <oldrev> <newrev>)" >&2
+        exit 1
+fi
+
+if [ -z "$ref" -o -z "$oldrev" -o -z "$newrev" ]; then
+        echo "Usage: $0 <ref> <oldrev> <newrev>" >&2
+        exit 1
+fi
+
+# --- Disallow pushing tags
+
+case "$ref" in
+    refs/tags/*)
+        echo "*** Pushing tags to this repository is not allowed" >&2
+        exit 1
+        ;;
+esac
