Skip to content

Commit 8ae6749

Browse files
Väinö Järvelägitster
authored andcommitted
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>
1 parent bd43098 commit 8ae6749

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Documentation/howto/update-hook-example.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,11 @@ This uses two files, $GIT_DIR/info/allowed-users and
158158
allowed-groups, to describe which heads can be pushed into by
159159
whom. The format of each file would look like this:
160160

161-
refs/heads/master junio
161+
refs/heads/master junio
162162
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
166166

167167
With this, Linus can push or create "bw/penguin" or "bw/zebra"
168168
or "bw/panda" branches, Pasky can do only "cogito", and JC can

0 commit comments

Comments
 (0)