Index: trunk/scripts/git-hooks/sub/update
===================================================================
--- trunk/scripts/git-hooks/sub/update	(revision 2538)
+++ trunk/scripts/git-hooks/sub/update	(revision 2539)
@@ -19,4 +19,23 @@
 fi
 
+# --- Disallow pushing to the branches for pockets
+
+pocket_to_git() {
+    local pocket git
+    pocket="$1"
+    git="$(invirt-getconf "git.pockets.$pocket.git" 2>/dev/null)"
+    if [ $? != 0 ]; then
+	git="$pocket"
+    fi
+    echo "$git"
+}
+
+for pocket in $(invirt-getconf -l git.pockets); do
+    if [ "$ref" = "refs/heads/$(pocket_to_git "$pocket")" ]; then
+	echo "*** Pushing to a pocket branch in this repository is not allowed" >&2
+	exit 1
+    fi
+done
+
 # --- Disallow pushing tags
 
