Code

Do not talk about "diff" in rev-list documentation.
[git.git] / Documentation / howto / update-hook-example.txt
index 3a33696f004493ac55124ece8b3088673b553c3c..3ef7c0d908d6c4d98d5d698587fa0fafb2cfa335 100644 (file)
@@ -1,4 +1,4 @@
-From: Junio C Hamano <junkio@cox.net> and Carl Baldwin <cnb@fc.hp.com>
+From: Junio C Hamano <gitster@pobox.com> and Carl Baldwin <cnb@fc.hp.com>
 Subject: control access to branches.
 Date: Thu, 17 Nov 2005 23:55:32 -0800
 Message-ID: <7vfypumlu3.fsf@assigned-by-dhcp.cox.net>
@@ -68,7 +68,7 @@ function info {
 # - Branches should only be fast-forwarded.
 case "$1" in
   refs/tags/*)
-    [ -f "$GIT_DIR/$1" ] &&
+    git rev-parse --verify -q "$1" &&
     deny >/dev/null "You can't overwrite an existing tag"
     ;;
   refs/heads/*)
@@ -158,11 +158,11 @@ This uses two files, $GIT_DIR/info/allowed-users and
 allowed-groups, to describe which heads can be pushed into by
 whom.  The format of each file would look like this:
 
-       refs/heads/master       junio
+        refs/heads/master      junio
         refs/heads/cogito$     pasky
-       refs/heads/bw/          linus
-        refs/heads/tmp/                *
-        refs/tags/v[0-9]     junio
+        refs/heads/bw/.*       linus
+        refs/heads/tmp/.*      .*
+        refs/tags/v[0-9].*     junio
 
 With this, Linus can push or create "bw/penguin" or "bw/zebra"
 or "bw/panda" branches, Pasky can do only "cogito", and JC can