@matheusbsbs / matheus-bagliano / commits / 8ae674952c
Fork 0

Fixed update-hook example allow-users format.

The example provided with the update-hook-example does not work on either bash 2.05b.0(1)-release nor 3.1.17(1)-release. The matcher did not match the lines that it advertised to match, such as: refs/heads/bw/ linus refs/heads/tmp/* * In POSIX 1003.2 regular expressions, the star (*), is not an wildcard meaning "match everything", it matches 0 or more matches of the atom preceding it. So to match "refs/heads/bw/topic-branch", the matcher should be written as "refs/heads/bw/.*" to match "refs/heads/bw/" and everything after it. Signed-off-by: Junio C Hamano <gitster@pobox.com>

Väinö Järvelä committed Sep 18, 2007 at 15:26 UTC 8ae674952c8f301034e8ae9dceff38dda740623b
1 file changed +4 -4
Documentation/howto/update-hook-example.txt
+4 -4
@@ -158,11 +158,11 @@ This uses two files, $GIT_DIR/info/allowed-users and
158 allowed-groups, to describe which heads can be pushed into by
159 whom. The format of each file would look like this:
160
161 - refs/heads/master junio
161 + refs/heads/master junio
162 refs/heads/cogito$ pasky
163 - refs/heads/bw/ linus
164 - refs/heads/tmp/ *
165 - refs/tags/v[0-9]* junio
163 + refs/heads/bw/.* linus
164 + refs/heads/tmp/.* .*
165 + refs/tags/v[0-9].* junio
166
167 With this, Linus can push or create "bw/penguin" or "bw/zebra"
168 or "bw/panda" branches, Pasky can do only "cogito", and JC can