git/list[1] front-page[2] threads[3] people[4] search[5] about
 

following Documentation/howto/update-hook-example.txt

From
Nicolas Vilz <niv@iaglans.de>
Date
Nov 19, 2006, 23:10 UTC
Message-ID
<20061119231044.GA31562@hermes.lan.home.vilz.de>
hello guys,

I tested the script mentioned in update-hook-example.txt and noticed, that the following line in allowed-users

refs/heads/tmp/         *
and the if-clause above 

matchlen=$(expr "$1" : "$head_pattern") if [ "$matchlen" == "${#1}" ]; then

does not recognize the header
refs/heads/tmp/blah

... so, all users trying to update or create branches named tmp/<insert_fancy_name_here> are denied, because nothing matches.

also the example case in which linus should be allowed to push and create branches bw/blah and bw/blupp doesn't work.

If I try following rule in allowed-users
refs/heads/tmp 		*
and someone tries to commit refs/heads/tmp, it works as intended.

This is at least in bash 3.1.2.5 ... (i tested that on my powerbook this week end). Perhaps it worked in November 2005. I don't know which version of bash was the latest then.

For all other examples in this document, it grants and denies pushing and creating branches as intended.

I haven't tried the tag-case yet.... could be, that this also doesn't work anymore.

Greetings Nicolas

Message 1 of 1 in “following Documentation/howto/update-hook-example.txt”
  1. Nicolas VilzNov 19, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.